更新 frontend/src/components/Layout.tsx

This commit is contained in:
LiJiLong 2026-01-28 08:21:14 +00:00
parent 43dca953ee
commit 416dff43e9

View File

@ -28,7 +28,7 @@ export default function Layout({ children }: LayoutProps) {
<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'
: 'text-gray-600 hover:bg-gray-100 hover:text-gray-900' : 'text-gray-600 hover:bg-gray-100 hover:text-gray-900'
}`} }`}
@ -38,7 +38,7 @@ export default function Layout({ children }: LayoutProps) {
<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'
: 'text-gray-600 hover:bg-gray-100 hover:text-gray-900' : 'text-gray-600 hover:bg-gray-100 hover:text-gray-900'
}`} }`}
@ -48,7 +48,7 @@ export default function Layout({ children }: LayoutProps) {
<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'
: 'text-gray-600 hover:bg-gray-100 hover:text-gray-900' : 'text-gray-600 hover:bg-gray-100 hover:text-gray-900'
}`} }`}