更新 frontend/src/components/Layout.tsx

This commit is contained in:
LiJiLong 2026-01-28 08:20:10 +00:00
parent 91db9246d3
commit 43dca953ee

View File

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