fix: dynamic site name

This commit is contained in:
shinya
2025-07-01 00:20:51 +08:00
parent 0563f2478e
commit 58f505e9d7
5 changed files with 46 additions and 11 deletions

View File

@@ -1,3 +1,5 @@
'use client';
import {
Clover,
Film,
@@ -22,6 +24,8 @@ import {
useState,
} from 'react';
import { useSiteName } from './SiteNameContext';
interface SidebarContextType {
isCollapsed: boolean;
}
@@ -164,7 +168,7 @@ const Sidebar = ({ onToggle, activePath = '/' }: SidebarProps) => {
{ icon: VenetianMask, label: '日漫', href: '/douban?type=tv&tag=日本动画' },
];
const siteName = process.env.NEXT_PUBLIC_SITE_NAME || 'MoonTV';
const siteName = useSiteName();
return (
<SidebarContext.Provider value={contextValue}>