{signingIn ? (
@@ -125,7 +141,7 @@ const Auth = ({
) : (
- Already have an account?{" "}
+ Have an account?{" "}
Sign in
diff --git a/client/components/header/header.module.css b/client/components/header/header.module.css
index b0aee771..636b5c47 100644
--- a/client/components/header/header.module.css
+++ b/client/components/header/header.module.css
@@ -23,7 +23,7 @@
.mobile {
position: absolute;
- z-index: 1;
+ z-index: 1000;
}
.controls {
diff --git a/client/components/header/index.tsx b/client/components/header/index.tsx
index a53b954b..b7a2582a 100644
--- a/client/components/header/index.tsx
+++ b/client/components/header/index.tsx
@@ -11,7 +11,6 @@ import {
import { useCallback, useEffect, useMemo, useState } from "react"
import styles from "./header.module.css"
-import useSignedIn from "../../lib/hooks/use-signed-in"
import HomeIcon from "@geist-ui/icons/home"
import MenuIcon from "@geist-ui/icons/menu"
@@ -25,7 +24,7 @@ import MoonIcon from "@geist-ui/icons/moon"
import SettingsIcon from "@geist-ui/icons/settings"
import SunIcon from "@geist-ui/icons/sun"
import { useTheme } from "next-themes"
-import useUserData from "@lib/hooks/use-user-data"
+// import useUserData from "@lib/hooks/use-user-data"
import Link from "next/link"
import { usePathname } from "next/navigation"
@@ -37,13 +36,13 @@ type Tab = {
href?: string
}
-const Header = () => {
+const Header = ({ signedIn = false }) => {
const pathname = usePathname()
const [expanded, setExpanded] = useState(false)
const [, setBodyHidden] = useBodyScroll(null, { scrollLayer: true })
const isMobile = useMediaQuery("xs", { match: "down" })
- const { signedIn: isSignedIn } = useSignedIn()
- const userData = useUserData()
+ // const { status } = useSession()
+ // const signedIn = status === "authenticated"
const [pages, setPages] = useState([])
const { setTheme, resolvedTheme } = useTheme()
@@ -76,7 +75,7 @@ const Header = () => {
}
]
- if (isSignedIn)
+ if (signedIn)
setPages([
{
name: "new",
@@ -126,20 +125,20 @@ const Header = () => {
},
...defaultPages
])
- if (userData?.role === "admin") {
- setPages((pages) => [
- ...pages,
- {
- name: "admin",
- icon: ,
- value: "admin",
- href: "/admin"
- }
- ])
- }
+ // if (userData?.role === "admin") {
+ // setPages((pages) => [
+ // ...pages,
+ // {
+ // name: "admin",
+ // icon: ,
+ // value: "admin",
+ // href: "/admin"
+ // }
+ // ])
+ // }
// TODO: investigate deps causing infinite loop
// eslint-disable-next-line react-hooks/exhaustive-deps
- }, [isMobile, isSignedIn, resolvedTheme, userData])
+ }, [isMobile, resolvedTheme])
const onTabChange = useCallback(
(tab: string) => {
@@ -172,7 +171,6 @@ const Header = () => {
return (