Skip to content

Commit

Permalink
FIX UI
Browse files Browse the repository at this point in the history
  • Loading branch information
a0p0bhv committed Jul 17, 2023
1 parent 4a17420 commit 2cbb253
Show file tree
Hide file tree
Showing 17 changed files with 407 additions and 269 deletions.
12 changes: 4 additions & 8 deletions src/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@ function AppRoutes() {
<Routes>
<Route
path='/'
Component={ExploreBasket}
Component={ExploreDashboard}
/>
{/* <Route
path='/token/:tokenId'
Component={TokenDetails}
<Route
path='/basket'
Component={ExploreBasket}
/>
<Route
path='create'
Component={CreateToken}
/> */}
</Routes>
</BrowserRouter>
)
Expand Down
47 changes: 24 additions & 23 deletions src/components/Dashboard_Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import {useEffect, useState, useRef } from 'react';
import { useEffect, useState, useRef } from 'react';
import avatar from '../images/avatar.png';
import logo from '../images/logo.png';


const Dashboard_Navbar = ({ navbarShadow }: { navbarShadow: boolean }) => {
const [showLogout, setShowLogout] = useState(false);
Expand Down Expand Up @@ -29,32 +32,30 @@ const Dashboard_Navbar = ({ navbarShadow }: { navbarShadow: boolean }) => {
};

return (
<div className={`flex flex-row fixed top-0 ${navbarShadow ? 'shadow-md shadow-gray-200' : ''} z-10 bg-white w-full py-7 p-5 sm:px-9 justify-between items-center`}>
<div className="flex font-bold text-[22px] space-x-2 justify-center items-center">
<img src={""} alt="logo" className="w-7 h-7" />
<div>Basket Protocol</div>
<>
<div className={`flex flex-row bg-white-100 fixed top-4 rounded-2xl !w-4/6 ${navbarShadow ? 'shadow-md shadow-gray-200' : ''} z-10 bg-white w-full py-6 p-5 sm:px-9 justify-between items-center bg-custom-400`}>
<div className="flex font-bold text-[22px] space-x-2 justify-center items-center">
<img src={logo} alt="logo" className="w-7 h-7" />
<div>Basket Protocol</div>
</div>
<button onClick={() => { }} className="bg-custom-500 text-white-100 font-bold py-2 px-6 rounded-lg cursor-pointer min-w-[140px]">Create Basket</button>
</div>
<div className="flex space-x-5">

<div className="flex justify-center items-center space-x-2 hover:opacity-80 cursor-pointer transition duration-200" onClick={handleImageClick}>
<div>
<img src={""} alt="profile" className="w-11 h-11" />
{showLogout && (
<div className="absolute right-6 sm:right-56 rounded-lg shadow-lg my-1 border" ref={logoutRef}>
<div className="flex space-x-2 px-2 sm:px-5 py-2 rounded-lg bg-white hover:bg-red-200 justify-center items-center">
{/* <HiOutlineLogout size={18} /> */}
logout
<div className='opacity-0 left-0 top-0 absolute sm:static sm:opacity-100' onClick={handleLogout}>Logout</div>
</div>
<div className="right-1 top-9 fixed flex justify-center items-center space-x-2 hover:opacity-80 cursor-pointer transition duration-200" onClick={handleImageClick}>
<div>
<img src={avatar} alt="profile" className="w-11 h-11" />
{showLogout && (
<div className="absolute right-6 sm:right-56 rounded-lg shadow-lg my-1 border" ref={logoutRef}>
<div className="flex space-x-2 px-2 sm:px-5 py-2 rounded-lg bg-white hover:bg-red-200 justify-center items-center">
<div className='opacity-0 left-0 top-0 absolute sm:static sm:opacity-100' onClick={handleLogout}>Logout</div>
</div>
)}
</div>
<div className="text-gray-500 text-sm opacity-0 left-0 top-0 sm:pr-8 absolute sm:opacity-100 sm:static">
[email protected]
</div>
</div>
)}
</div>
<div className="text-gray-500 text-sm opacity-0 left-0 top-0 sm:pr-8 absolute sm:opacity-100 sm:static">
Anurag
</div>
</div>
</div>
</>
);
};

Expand Down
Binary file added src/images/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/images/book.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions src/images/index-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/index-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions src/images/index-3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions src/images/index-4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2cbb253

Please sign in to comment.