feat(frontend): incomplete port to next.js
This commit is contained in:
parent
b9c30379ee
commit
eec01dc070
50 changed files with 2874 additions and 3163 deletions
24
frontend/components/NavItem.tsx
Normal file
24
frontend/components/NavItem.tsx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { ReactNode } from "react";
|
||||
import Link from "next/link";
|
||||
|
||||
export interface Props {
|
||||
children?: ReactNode | undefined;
|
||||
href: string;
|
||||
plain?: boolean | undefined; // Do not wrap in <li></li>
|
||||
}
|
||||
|
||||
export default function NavItem(props: Props) {
|
||||
const ret = (
|
||||
<Link
|
||||
className="hover:text-sky-500 dark:hover:text-sky-400"
|
||||
href={props.href}
|
||||
>
|
||||
{props.children}
|
||||
</Link>
|
||||
);
|
||||
|
||||
if (props.plain) {
|
||||
return ret;
|
||||
}
|
||||
return <li>{ret}</li>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue