From 46ed382d565ea196216d124337f638e154a43936 Mon Sep 17 00:00:00 2001 From: tymur999 Date: Wed, 4 Mar 2026 20:29:53 -0600 Subject: [PATCH] links styling fix (no underline) --- src/router/Link.tsx | 4 ++-- src/router/Route.tsx | 2 +- src/router/link.scss | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/router/Link.tsx b/src/router/Link.tsx index 33d1897..3dedff8 100644 --- a/src/router/Link.tsx +++ b/src/router/Link.tsx @@ -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 {children} + return {children} } \ No newline at end of file diff --git a/src/router/Route.tsx b/src/router/Route.tsx index 70a93de..fb1e6d5 100644 --- a/src/router/Route.tsx +++ b/src/router/Route.tsx @@ -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} : <> } \ No newline at end of file diff --git a/src/router/link.scss b/src/router/link.scss index 8d43b38..67d3a9d 100644 --- a/src/router/link.scss +++ b/src/router/link.scss @@ -1,6 +1,7 @@ .link { color: white; - text-decoration: underline; + text-decoration: none; + text-align: center; } .link:hover {