Revert "feat: add custom site name"

This reverts commit 6d71fde9ee.
This commit is contained in:
shinya
2025-07-01 00:25:28 +08:00
parent 58f505e9d7
commit d56cc5bdab
9 changed files with 105 additions and 130 deletions

View File

@@ -1,5 +1,3 @@
'use client';
import {
Clover,
Film,
@@ -24,8 +22,6 @@ import {
useState,
} from 'react';
import { useSiteName } from './SiteNameContext';
interface SidebarContextType {
isCollapsed: boolean;
}
@@ -37,17 +33,13 @@ const SidebarContext = createContext<SidebarContextType>({
export const useSidebar = () => useContext(SidebarContext);
// 可替换为你自己的 logo 图片
interface LogoProps {
siteName: string;
}
const Logo = ({ siteName }: LogoProps) => (
const Logo = () => (
<Link
href='/'
className='flex items-center justify-center h-16 select-none hover:opacity-80 transition-opacity duration-200'
>
<span className='text-2xl font-bold text-green-600 tracking-tight'>
{siteName}
MoonTV
</span>
</Link>
);
@@ -64,8 +56,6 @@ declare global {
}
}
export const dynamic = 'force-dynamic';
const Sidebar = ({ onToggle, activePath = '/' }: SidebarProps) => {
const router = useRouter();
const pathname = usePathname();
@@ -168,8 +158,6 @@ const Sidebar = ({ onToggle, activePath = '/' }: SidebarProps) => {
{ icon: VenetianMask, label: '日漫', href: '/douban?type=tv&tag=日本动画' },
];
const siteName = useSiteName();
return (
<SidebarContext.Provider value={contextValue}>
{/* 在移动端隐藏侧边栏 */}
@@ -193,7 +181,7 @@ const Sidebar = ({ onToggle, activePath = '/' }: SidebarProps) => {
}`}
>
<div className='w-[calc(100%-4rem)] flex justify-center'>
{!isCollapsed && <Logo siteName={siteName} />}
{!isCollapsed && <Logo />}
</div>
</div>
<button