From 289e387f15aefc2f588f731ca1b2751314d9fdb5 Mon Sep 17 00:00:00 2001 From: Zeke Abshire Date: Fri, 24 Mar 2023 01:29:43 -0500 Subject: [PATCH] Merged MainLayout and SidePanel --- src/components/SidePanel.tsx | 103 ------------------------- src/components/layouts/MainLayout.tsx | 106 +++++++++++++++++++++++++- 2 files changed, 105 insertions(+), 104 deletions(-) delete mode 100644 src/components/SidePanel.tsx diff --git a/src/components/SidePanel.tsx b/src/components/SidePanel.tsx deleted file mode 100644 index c5e02af..0000000 --- a/src/components/SidePanel.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import { typo } from "@styles/typography"; -import Link from "next/link"; -import { - FiMenu, - FiHome, - FiSearch, - FiClipboard, - FiEdit, - FiArchive, - FiUser, - FiSettings, -} from "react-icons/fi"; -import type { IconType } from "react-icons/lib"; -import { Button } from "@components/Button"; -import * as DropdownMenu from "@radix-ui/react-dropdown-menu"; - -interface NavItem { - label: string; - route: string; - Icon: IconType; -} - -const navItems: NavItem[] = [ - { label: "Home", route: "/projects", Icon: FiHome }, - { label: "Search", route: "/discover", Icon: FiSearch }, - { label: "Proposals", route: "/discover/proposals", Icon: FiClipboard }, - { label: "Revisions", route: "/discover/revisions", Icon: FiEdit }, - { label: "Archive", route: "/discover/archive", Icon: FiArchive }, - { label: "Profile", route: "/profile", Icon: FiUser }, -]; - -export const SidePanel: React.FC = () => { - return ( -
-
-
-

- - || Parallel - -

- - -
- -
-
- ); -}; - -const MoreMenu: React.FC = () => { - const container = - typeof window !== "undefined" ? document.getElementById("root") : null; - - return ( - - - - - - - - -

Settings

- -
-
-
-
- ); -}; diff --git a/src/components/layouts/MainLayout.tsx b/src/components/layouts/MainLayout.tsx index 5da585e..cd71476 100644 --- a/src/components/layouts/MainLayout.tsx +++ b/src/components/layouts/MainLayout.tsx @@ -1,5 +1,19 @@ -import { SidePanel } from "@components/SidePanel"; import type { Children } from "@utils/types/props"; +import { typo } from "@styles/typography"; +import Link from "next/link"; +import { + FiMenu, + FiHome, + FiSearch, + FiClipboard, + FiEdit, + FiArchive, + FiUser, + FiSettings, +} from "react-icons/fi"; +import type { IconType } from "react-icons/lib"; +import { Button } from "@components/Button"; +import * as DropdownMenu from "@radix-ui/react-dropdown-menu"; export const MainLayout: React.FC = ({ children }) => { return ( @@ -9,3 +23,93 @@ export const MainLayout: React.FC = ({ children }) => { ); }; + +// === Side Panel ============================================================= + +interface NavItem { + label: string; + route: string; + Icon: IconType; +} + +const navItems: NavItem[] = [ + { label: "Home", route: "/projects", Icon: FiHome }, + { label: "Search", route: "/discover", Icon: FiSearch }, + { label: "Proposals", route: "/discover/proposals", Icon: FiClipboard }, + { label: "Revisions", route: "/discover/revisions", Icon: FiEdit }, + { label: "Archive", route: "/discover/archive", Icon: FiArchive }, + { label: "Profile", route: "/profile", Icon: FiUser }, +]; + +export const SidePanel: React.FC = () => { + return ( +
+
+
+

+ + || Parallel + +

+ + +
+ +
+
+ ); +}; + +const MoreMenu: React.FC = () => { + const container = + typeof window !== "undefined" ? document.getElementById("root") : null; + + return ( + + + + + + + + +

Settings

+ +
+
+
+
+ ); +};