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"
|
import Badge from "../badge"
|
||||||
|
|
||||||
const CreatedAgoBadge = ({ createdAt }: { createdAt: string | Date }) => {
|
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 [time, setTimeAgo] = useState(timeAgo(createdDate))
|
||||||
|
|
||||||
const { setToast } = useToasts()
|
const { setToast } = useToasts()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { useSelectedLayoutSegment, useSelectedLayoutSegments } from "next/navigation"
|
import { useSelectedLayoutSegments } from "next/navigation"
|
||||||
import FadeIn from "@components/fade-in"
|
import FadeIn from "@components/fade-in"
|
||||||
import { setDriftTheme } from "src/app/lib/set-theme"
|
import { setDriftTheme } from "src/app/lib/set-theme"
|
||||||
import {
|
import {
|
||||||
|
@ -47,12 +47,14 @@ export function HeaderButtons({
|
||||||
}) {
|
}) {
|
||||||
const { isAdmin, userId } = useSessionSWR()
|
const { isAdmin, userId } = useSessionSWR()
|
||||||
const { resolvedTheme } = useTheme();
|
const { resolvedTheme } = useTheme();
|
||||||
return getButtons({
|
return <>
|
||||||
|
{getButtons({
|
||||||
isAuthenticated,
|
isAuthenticated,
|
||||||
theme: resolvedTheme ? resolvedTheme : initialTheme,
|
theme: resolvedTheme ? resolvedTheme : initialTheme,
|
||||||
isAdmin,
|
isAdmin,
|
||||||
userId
|
userId
|
||||||
})
|
})}
|
||||||
|
</>
|
||||||
}
|
}
|
||||||
|
|
||||||
function NavButton(tab: Tab) {
|
function NavButton(tab: Tab) {
|
||||||
|
|
Loading…
Reference in a new issue