links styling fix (no underline)

This commit is contained in:
2026-03-04 20:29:53 -06:00
parent fd13b72380
commit 46ed382d56
3 changed files with 5 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ import React, {PropsWithChildren} from "react";
import {useRouter} from "./RouterContext";
import {Path} from "./router";
export function Link(props: {className: string, href: Path, replace?: boolean } & PropsWithChildren) {
export function Link(props: {className?: string, href: Path, replace?: boolean } & PropsWithChildren) {
const {children, className, href, replace} = props;
const router = useRouter();
@@ -17,5 +17,5 @@ export function Link(props: {className: string, href: Path, replace?: boolean }
}
}
return <a onClick={onClick} href={href} className={`${className} link click`}>{children}</a>
return <a onClick={onClick} href={href} className={`${className} link`}>{children}</a>
}

View File

@@ -6,5 +6,5 @@ export function Route(props: PropsWithChildren & {path: Path}) {
const {path, children} = props;
const router = useRouter();
return router.current === path ? <>{children}</> : <></>
return router.current.toLowerCase() === path ? <>{children}</> : <></>
}

View File

@@ -1,6 +1,7 @@
.link {
color: white;
text-decoration: underline;
text-decoration: none;
text-align: center;
}
.link:hover {