-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8fcd0a
commit 3134103
Showing
29 changed files
with
487 additions
and
114 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.navbar { | ||
height: 64px; | ||
} | ||
|
||
.MuiPaper-root.MuiAppBar-root { | ||
position: sticky; | ||
background-color: white; | ||
z-index: 1299; | ||
box-shadow: 0px 1px 4px rgba(59, 59, 59, 0.1); | ||
} | ||
|
||
.navbar-div { | ||
height: 64px; | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
align-items: flex-start; | ||
padding: 0px 5.56%; | ||
} | ||
|
||
.right-side { | ||
display: flex; | ||
align-self: center; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { AppBar } from "@mui/material"; | ||
import AccountAvatar from "../AccountAvatar"; | ||
import NavBarLogo from "../NavBarLogo"; | ||
import { routes } from "../../constants/routes"; | ||
|
||
const AdminNavBar = () => { | ||
return ( | ||
<AppBar className="navbar"> | ||
<div className="navbar-div"> | ||
<NavBarLogo homeRoute={routes.ADMIN_HOME} /> | ||
|
||
<div className="right-side"> | ||
<AccountAvatar /> | ||
</div> | ||
</div> | ||
</AppBar> | ||
); | ||
}; | ||
export default AdminNavBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.navbar-info { | ||
user-select: none; | ||
text-decoration: none; | ||
display: flex; | ||
flex-direction: row; | ||
cursor: pointer; | ||
} | ||
|
||
.logo { | ||
height: 32px; | ||
margin: 16px 32px 16px 0; | ||
} | ||
|
||
.navbar-text { | ||
height: 64px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
color: #000000; | ||
} | ||
|
||
.navbar-company p { | ||
font-style: normal; | ||
font-weight: 400; | ||
font-size: 16px; | ||
line-height: 24px; | ||
margin: 0; | ||
} | ||
|
||
.navbar-title p { | ||
font-style: normal; | ||
font-weight: 300; | ||
font-size: 14px; | ||
line-height: 18px; | ||
margin: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* eslint-disable no-restricted-globals */ | ||
import "./NavBarLogo.css"; | ||
import { Typography } from "@mui/material"; | ||
import { Link, useNavigate } from "react-router-dom"; | ||
import logo from "../../img/pd-logo.svg"; | ||
|
||
type Props = { | ||
handleClickCallback?: () => void; | ||
homeRoute: string; | ||
}; | ||
|
||
const NavBarLogo = ({ homeRoute, handleClickCallback }: Props) => { | ||
const navigate = useNavigate(); | ||
|
||
const forceReloadHome = () => { | ||
if (location.pathname === homeRoute) navigate(0); | ||
}; | ||
const handleClickLogo = () => { | ||
handleClickCallback?.(); | ||
forceReloadHome(); | ||
}; | ||
|
||
return ( | ||
<Link to={homeRoute} className="navbar-info" onClick={handleClickLogo}> | ||
<img src={logo} alt="logo" className="logo" /> | ||
<div className="navbar-text"> | ||
<span className="navbar-company"> | ||
<Typography>ProductDock</Typography> | ||
</span> | ||
<span className="navbar-title"> | ||
<Typography>Library</Typography> | ||
</span> | ||
</div> | ||
</Link> | ||
); | ||
}; | ||
|
||
export default NavBarLogo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.