mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
fix: resolve server-side rendering issue with Mac detection in Footer
This commit is contained in:
parent
2164321e72
commit
e55a60c12e
@ -1,6 +1,8 @@
|
||||
"use client"
|
||||
|
||||
import pack from "@/package.json"
|
||||
import { useTranslations } from "next-intl"
|
||||
|
||||
import { useEffect, useState } from "react"
|
||||
const GITHUB_URL = "https://github.com/hamster1963/nezha-dash"
|
||||
const PERSONAL_URL = "https://buycoffee.top"
|
||||
|
||||
@ -27,7 +29,11 @@ export default function Footer() {
|
||||
const t = useTranslations("Footer")
|
||||
const version = pack.version
|
||||
const currentYear = new Date().getFullYear()
|
||||
const isMac = /macintosh|mac os x/i.test(navigator.userAgent)
|
||||
const [isMac, setIsMac] = useState(true)
|
||||
|
||||
useEffect(() => {
|
||||
setIsMac(/macintosh|mac os x/i.test(navigator.userAgent))
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<footer className="mx-auto w-full max-w-5xl flex items-center justify-between">
|
||||
|
Loading…
Reference in New Issue
Block a user