Major header and routing improvments

This commit is contained in:
rift 2023-12-13 19:38:01 -06:00
parent 226560dc52
commit 25c4a1e9ce
5 changed files with 58 additions and 80 deletions

View file

@ -0,0 +1,22 @@
import { useTranslation } from "react-i18next";
import { Link } from 'preact-router';
interface HeaderButtonProps {
href: string;
Icon: any;
translationKey: string;
}
export function HeaderButton(props: HeaderButtonProps) {
const { href, Icon, translationKey } = props;
const { t } = useTranslation();
return (
<Link href={href}>
<div class="p-4 flex flex-row items-center">
<Icon class="w-6 h-6"/>
<span className="text-text-color text-lg pl-1 font-roboto font-bold">{t(translationKey)}</span>
</div>
</Link>
)
}