mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
fix(header): logo path
This commit is contained in:
parent
cb278ec742
commit
0b061d805e
@ -7,13 +7,11 @@ import { Skeleton } from "@/components/ui/skeleton";
|
|||||||
import getEnv from "@/lib/env-entry";
|
import getEnv from "@/lib/env-entry";
|
||||||
import { DateTime } from "luxon";
|
import { DateTime } from "luxon";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import { useTheme } from "next-themes";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import React, { useEffect, useRef, useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
|
|
||||||
function Header() {
|
function Header() {
|
||||||
const t = useTranslations("Header");
|
const t = useTranslations("Header");
|
||||||
const { resolvedTheme } = useTheme();
|
|
||||||
const customLogo = getEnv("NEXT_PUBLIC_CustomLogo");
|
const customLogo = getEnv("NEXT_PUBLIC_CustomLogo");
|
||||||
const customTitle = getEnv("NEXT_PUBLIC_CustomTitle");
|
const customTitle = getEnv("NEXT_PUBLIC_CustomTitle");
|
||||||
const customDescription = getEnv("NEXT_PUBLIC_CustomDescription");
|
const customDescription = getEnv("NEXT_PUBLIC_CustomDescription");
|
||||||
@ -35,14 +33,15 @@ function Header() {
|
|||||||
width={40}
|
width={40}
|
||||||
height={40}
|
height={40}
|
||||||
alt="apple-touch-icon"
|
alt="apple-touch-icon"
|
||||||
src={
|
src={customLogo ? customLogo : "/apple-touch-icon.png"}
|
||||||
customLogo
|
className="relative m-0! border-2 border-transparent h-6 w-6 object-cover object-top p-0! dark:hidden"
|
||||||
? customLogo
|
/>
|
||||||
: resolvedTheme === "light"
|
<img
|
||||||
? "/apple-touch-icon.png"
|
width={40}
|
||||||
: "/apple-touch-icon-dark.png"
|
height={40}
|
||||||
}
|
alt="apple-touch-icon"
|
||||||
className="relative m-0! border-2 border-transparent h-6 w-6 object-cover object-top p-0!"
|
src={customLogo ? customLogo : "/apple-touch-icon-dark.png"}
|
||||||
|
className="relative m-0! border-2 border-transparent h-6 w-6 object-cover object-top p-0! hidden dark:block"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{customTitle ? customTitle : "NezhaDash"}
|
{customTitle ? customTitle : "NezhaDash"}
|
||||||
|
Loading…
Reference in New Issue
Block a user