更新 frontend/src/components/Layout.tsx

This commit is contained in:
LiJiLong 2026-01-28 08:57:30 +00:00
parent f751d656c8
commit bbd6e39c65

View File

@ -26,9 +26,9 @@ export default function Layout({ children }: LayoutProps) {
<nav className="flex space-x-1">
<Link
to="./"
to="/aistudy/frontend/"
className={`px-4 py-2 rounded-md text-sm font-medium transition-colors ${
isActive('./') && location.pathname === './'
isActive('/aistudy/frontend/') && location.pathname === './'
? 'bg-primary-100 text-primary-700'
: 'text-gray-600 hover:bg-gray-100 hover:text-gray-900'
}`}
@ -36,9 +36,9 @@ export default function Layout({ children }: LayoutProps) {
</Link>
<Link
to="./courses"
to="/aistudy/frontend/courses"
className={`px-4 py-2 rounded-md text-sm font-medium transition-colors ${
isActive('./courses')
isActive('/aistudy/frontend/courses')
? 'bg-primary-100 text-primary-700'
: 'text-gray-600 hover:bg-gray-100 hover:text-gray-900'
}`}
@ -46,9 +46,9 @@ export default function Layout({ children }: LayoutProps) {
</Link>
<Link
to="./paths"
to="/aistudy/frontend/paths"
className={`px-4 py-2 rounded-md text-sm font-medium transition-colors ${
isActive('./paths')
isActive('/aistudy/frontend/paths')
? 'bg-primary-100 text-primary-700'
: 'text-gray-600 hover:bg-gray-100 hover:text-gray-900'
}`}