-
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.
feat(src): ✨ Reorder entire dashboard to be unified
Remove different navbars, single nav, single layout
- Loading branch information
1 parent
944ca03
commit 3e14839
Showing
18 changed files
with
130 additions
and
209 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,72 @@ | ||
"use client"; | ||
|
||
import { AppShellNavbar, Group, Image, Text } from "@mantine/core"; | ||
import { IconLogout, IconSwitchHorizontal } from "@tabler/icons-react"; | ||
|
||
import classes from "@/styles/Navbar.module.css"; | ||
import { navLinks } from "@/util/links"; | ||
import { signOut } from "next-auth/react"; | ||
import Anchor from "../core/Anchor"; | ||
|
||
export interface ToolsNavbar { | ||
currentLink: string; | ||
currentSpace: "me" | "team"; | ||
} | ||
|
||
/** | ||
* Main Navbar | ||
*/ | ||
export default function ToolsNavbar(props: ToolsNavbar) { | ||
const links = navLinks[props.currentSpace].map((item) => ( | ||
<a | ||
className={classes.navbarLink} | ||
data-active={item.link == props.currentLink} | ||
href={item.link} | ||
key={item.label} | ||
> | ||
<item.icon className={classes.navbarLinkIcon} stroke={1.5} /> | ||
<span>{item.label}</span> | ||
</a> | ||
)); | ||
|
||
return ( | ||
<AppShellNavbar p={"sm"} h="100%"> | ||
<div className={classes.navbarTop}> | ||
<Group className={classes.navbarHead} justify="space-between"> | ||
<Group> | ||
<Image src="/logo.png" h={32} alt="BuildTheEarth Logo" /> | ||
<Text fw="bold" fz="xl" lineClamp={1}> | ||
MyBuildTheEarth | ||
</Text> | ||
</Group> | ||
</Group> | ||
|
||
<div className={classes.navbarLinks}>{links}</div> | ||
</div> | ||
<div className={classes.navbarBottom}> | ||
{props.currentSpace == "team" ? ( | ||
<Anchor href="/" className={classes.navbarLink} underline="never"> | ||
<IconSwitchHorizontal | ||
className={classes.navbarLinkIcon} | ||
stroke={1.5} | ||
/> | ||
<span>My Dashboard</span> | ||
</Anchor> | ||
) : ( | ||
<Anchor href="/team" className={classes.navbarLink} underline="never"> | ||
<IconSwitchHorizontal | ||
className={classes.navbarLinkIcon} | ||
stroke={1.5} | ||
/> | ||
<span>Team Dashboard</span> | ||
</Anchor> | ||
)} | ||
|
||
<a className={classes.navbarLink} onClick={() => signOut()}> | ||
<IconLogout className={classes.navbarLinkIcon} stroke={1.5} /> | ||
<span>Logout</span> | ||
</a> | ||
</div> | ||
</AppShellNavbar> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.