From f2e98257b3174a9392759b2498c69dc0d0c25fee Mon Sep 17 00:00:00 2001 From: Timur Ercan Date: Tue, 6 Dec 2022 18:20:12 +0100 Subject: [PATCH] light app shell --- apps/web/components/layout.tsx | 362 +++++++++++++++++---------------- apps/web/pages/_document.jsx | 5 +- 2 files changed, 183 insertions(+), 184 deletions(-) diff --git a/apps/web/components/layout.tsx b/apps/web/components/layout.tsx index 01702adb5..86b4c3a5a 100644 --- a/apps/web/components/layout.tsx +++ b/apps/web/components/layout.tsx @@ -1,223 +1,225 @@ -import React, { ReactNode, Fragment } from "react"; +import { Fragment } from "react"; import { Disclosure, Menu, Transition } from "@headlessui/react"; import { Bars3Icon, BellIcon, XMarkIcon } from "@heroicons/react/24/outline"; -interface Props { - children?: any; -} - const user = { - name: "Tom Cook", - email: "tom@example.com", + name: "Timur Ercan", + email: "timur@documenso.com", imageUrl: - "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80", + "https://pbs.twimg.com/profile_images/1382036502390181888/4BT30oTM_400x400.jpg", }; const navigation = [ { name: "Dashboard", href: "#", current: true }, { name: "Team", href: "#", current: false }, - { name: "Projects", href: "#", current: false }, - { name: "Calendar", href: "#", current: false }, - { name: "Reports", href: "#", current: false }, + { name: "Settings", href: "#" }, ]; const userNavigation = [ { name: "Your Profile", href: "#" }, - { name: "Settings", href: "#" }, { name: "Sign out", href: "#" }, ]; -function classNames(...classes: any) { +function classNames(...classes) { return classes.filter(Boolean).join(" "); } -export default function Layout({ children }: Props) { +export default function Layout({ children }) { return ( <>
-
- - {({ open }: any) => ( - <> -
-
-
-
-
- Your Company -
-
-
- {navigation.map((item) => ( - - {item.name} - - ))} -
-
-
-
-
- - - {/* Profile dropdown */} - -
- - Open user menu - - -
- - - {userNavigation.map((item) => ( - - {({ active }: any) => ( - - {item.name} - - )} - - ))} - - -
-
-
-
- {/* Mobile menu button */} - - Open main menu - {open ? ( -
+ + +
+ {navigation.map((item) => ( + + {item.name} + + ))} +
+
+
+
+ +
+
+
+ {user.name} +
+
+ {user.email} +
+
+ +
+
+ {userNavigation.map((item) => ( {item.name} ))}
-
-
-
- -
-
-
- {user.name} -
-
- {user.email} -
-
- -
-
- {userNavigation.map((item) => ( - - {item.name} - - ))} -
-
- - - )} - -
+
+
+ + )} + + +
+
-

+

Dashboard

-
- -
-
-
- {children} +
+
+ {/* Replace with your content */} +
+
+ {children} +
+
+ {/* /End replace */}
-
-
+ +
); diff --git a/apps/web/pages/_document.jsx b/apps/web/pages/_document.jsx index c4fe37d5b..0616091ab 100644 --- a/apps/web/pages/_document.jsx +++ b/apps/web/pages/_document.jsx @@ -5,10 +5,7 @@ export default function Document(props) { let pageProps = props.__NEXT_DATA__?.props?.pageProps; return ( - +