links styling fix (no underline)
This commit is contained in:
@@ -4,7 +4,7 @@ import React, {PropsWithChildren} from "react";
|
|||||||
import {useRouter} from "./RouterContext";
|
import {useRouter} from "./RouterContext";
|
||||||
import {Path} from "./router";
|
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 {children, className, href, replace} = props;
|
||||||
const router = useRouter();
|
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>
|
||||||
}
|
}
|
||||||
@@ -6,5 +6,5 @@ export function Route(props: PropsWithChildren & {path: Path}) {
|
|||||||
const {path, children} = props;
|
const {path, children} = props;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
return router.current === path ? <>{children}</> : <></>
|
return router.current.toLowerCase() === path ? <>{children}</> : <></>
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
.link {
|
.link {
|
||||||
color: white;
|
color: white;
|
||||||
text-decoration: underline;
|
text-decoration: none;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link:hover {
|
.link:hover {
|
||||||
|
|||||||
Reference in New Issue
Block a user