diff --git a/components/navbar/Navbar.tsx b/components/navbar/Navbar.tsx index f4c7178..90a8a2e 100644 --- a/components/navbar/Navbar.tsx +++ b/components/navbar/Navbar.tsx @@ -1,6 +1,6 @@ import Link from "next/link"; import {signOut, useSession} from "next-auth/react"; -import {FiBell, FiChevronDown, FiGrid, FiSearch, FiUser} from "react-icons/fi"; +import {FiBell, FiChevronDown, FiGrid, FiLogOut, FiSearch, FiUser} from "react-icons/fi"; import {useEffect} from "react"; import {useRouter} from "next/router"; import {MoreMenu, MoreMenuItem} from "../headless/MoreMenu"; @@ -12,6 +12,7 @@ import {NotificationApiResponse} from "../../pages/api/notification"; import getProjectUrl from "../../utils/getProjectUrl"; import {formatDistanceToNow} from "date-fns"; import Button from "../headless/Button"; +import classNames from "classnames"; function getNotificationText(notification: DatedObj) { if (["commentLike", "nodeLike"].includes(notification.type)) { @@ -40,37 +41,45 @@ function NotificationItem({notification}: {notification: DatedObj []); return (
- - - {session && ( - - -
- -
- Projects -
- + + + {!isProjectSubpage && ( + <> + {session && ( + + +
+ +
+ Projects +
+ + )} + + +
+ +
+ Explore +
+ + )} - - -
- -
- Explore -
-
{session && notificationsData && ( )}> - Profile - signOut()}>Sign out + Projects + Explore + Profile + signOut()} flex={true}>Sign out ) : status === "loading" ? (

Loading...

diff --git a/components/project/MainShell.tsx b/components/project/MainShell.tsx index e80fd84..1bcc969 100644 --- a/components/project/MainShell.tsx +++ b/components/project/MainShell.tsx @@ -27,6 +27,8 @@ import ExploreNodeCard from "../explore/ExploreNodeCard"; import H3 from "../style/H3"; import PublicNavbar from "./PublicNavbar"; import TabButton from "../style/TabButton"; +import classNames from "classnames"; +import {getIsProjectSubpage} from "../navbar/Navbar"; export type NodeWithShortcut = NodeObj & {shortcut?: DatedObj, project?: DatedObj}; @@ -239,7 +241,9 @@ export default function MainShell({pageProject, pageUser, thisUser, children}: P return ( - + {getIsProjectSubpage(router.route) && ( + + )}
@@ -269,9 +273,7 @@ export default function MainShell({pageProject, pageUser, thisUser, children}: P )}
- {pageProject.description && ( -

{pageProject.description}

- )} +

{pageProject.description || "Repo has no description"}

diff --git a/components/project/PublicNavbar.tsx b/components/project/PublicNavbar.tsx index 00501ef..50d1cbc 100644 --- a/components/project/PublicNavbar.tsx +++ b/components/project/PublicNavbar.tsx @@ -6,12 +6,12 @@ import {DatedObj, ProjectObj, UserObj} from "../../utils/types"; export default function PublicNavbar({pageUser, pageProject}: {pageUser: DatedObj, pageProject: DatedObj}) { return (