diff --git a/src/app/dashboard/[subdomain]/layout-component.tsx b/src/app/dashboard/[subdomain]/layout-component.tsx index 62f07f68..fec66fcc 100644 --- a/src/app/dashboard/[subdomain]/layout-component.tsx +++ b/src/app/dashboard/[subdomain]/layout-component.tsx @@ -12,7 +12,6 @@ import { import { ConnectButton } from "~/components/common/ConnectButton" import { Logo } from "~/components/common/Logo" -import { DashboardSidebar } from "~/components/dashboard/DashboardSidebar" import { DashboardTopbar } from "~/components/dashboard/DashboardTopbar" import { Avatar } from "~/components/ui/Avatar" import { UniLink } from "~/components/ui/UniLink" @@ -198,7 +197,7 @@ export default function DashboardLayout({ } /> )} -
+
{isMobileLayout ? ( @@ -274,7 +272,7 @@ export default function DashboardLayout({ href={getSiteLink({ subdomain, })} - className="space-x-2 border rounded-lg bg-slate-100 border-slate-200 text-accent hover:scale-105 transition-transform flex w-full h-12 items-center justify-center" + className="space-x-2 border rounded-lg border-slate-200 text-accent hover:scale-105 transition-transform flex w-full h-12 items-center justify-center bg-white drop-shadow-sm" > {{t("View Site")}} @@ -287,121 +285,120 @@ export default function DashboardLayout({ {(isOpen) =>
233
}
) : ( - - {(isOpen) => ( - <> -
-
-
- -
- {isOpen && "xLog"} -
- {account?.character?.handle && - subdomain && - account?.character?.handle !== subdomain && ( -
-
- {isOpen && "You are operating"} -
- - {isOpen && ( - - - {site.data?.metadata?.content?.name} - - - @{site.data?.handle} - - - )} -
- )} -
- +
+
+
+
+
+ xLog +
+ {account?.character?.handle && + subdomain && + account?.character?.handle !== subdomain && ( +
+
You are operating
+ + + + {site.data?.metadata?.content?.name} + + + @{site.data?.handle} + + +
+ )} +
+ +
-
- {links.map((link) => { - const active = - link.href && - link.isActive({ - pathname: pathname, - href: link.href, - }) - return ( - - - {isOpen && ( - {t(link.text)} - )} - - ) - })} -
+
+ {links.map((link) => { + const active = + link.href && + link.isActive({ + pathname: pathname, + href: link.href, + }) + return ( + + + {t(link.text)} + + ) + })}
-
- - - {isOpen && {t("Need help?")}} - - - - {isOpen && {t("View Site")}} - -
- - )} - +
+
+ + + {t("Need help?")} + + + + {t("View Site")} + +
+
+
)} -
- {children} +
+
+ {children} +
diff --git a/src/components/dashboard/DashboardSidebar.tsx b/src/components/dashboard/DashboardSidebar.tsx deleted file mode 100644 index 934735df..00000000 --- a/src/components/dashboard/DashboardSidebar.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { useEffect, useState } from "react" - -import { getStorage, setStorage } from "~/lib/storage" - -export const DashboardSidebar = ({ - children, -}: { - children: (isOpen: boolean) => React.ReactNode -}) => { - const [isOpen, setIsOpen] = useState(true) - - useEffect(() => { - const storage = getStorage("sidebar") - if (storage) { - setIsOpen(storage.isOpen) - } - }, []) - - useEffect(() => { - setStorage("sidebar", { - isOpen, - }) - }, [isOpen]) - - return ( -
-
- {children(isOpen)} -
-
setIsOpen(!isOpen)} - > - {isOpen ? ( - - ) : ( - - )} -
-
-
- ) -}