fix: build errors (#145)
This commit is contained in:
parent
d0a73a7cbc
commit
0f58c44261
2 changed files with 10 additions and 8 deletions
|
@ -7,7 +7,7 @@ import { useMemo, useState, useEffect } from "react"
|
|||
import Badge from "../badge"
|
||||
|
||||
const CreatedAgoBadge = ({ createdAt }: { createdAt: string | Date }) => {
|
||||
const createdDate = new Date(createdAt)
|
||||
const createdDate = useMemo(() => new Date(createdAt), [createdAt])
|
||||
const [time, setTimeAgo] = useState(timeAgo(createdDate))
|
||||
|
||||
const { setToast } = useToasts()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"use client"
|
||||
|
||||
import { useSelectedLayoutSegment, useSelectedLayoutSegments } from "next/navigation"
|
||||
import { useSelectedLayoutSegments } from "next/navigation"
|
||||
import FadeIn from "@components/fade-in"
|
||||
import { setDriftTheme } from "src/app/lib/set-theme"
|
||||
import {
|
||||
|
@ -47,12 +47,14 @@ export function HeaderButtons({
|
|||
}) {
|
||||
const { isAdmin, userId } = useSessionSWR()
|
||||
const { resolvedTheme } = useTheme();
|
||||
return getButtons({
|
||||
isAuthenticated,
|
||||
theme: resolvedTheme ? resolvedTheme : initialTheme,
|
||||
isAdmin,
|
||||
userId
|
||||
})
|
||||
return <>
|
||||
{getButtons({
|
||||
isAuthenticated,
|
||||
theme: resolvedTheme ? resolvedTheme : initialTheme,
|
||||
isAdmin,
|
||||
userId
|
||||
})}
|
||||
</>
|
||||
}
|
||||
|
||||
function NavButton(tab: Tab) {
|
||||
|
|
Loading…
Reference in a new issue