Add browse link on home page

This commit is contained in:
Zoe Roux 2023-10-22 00:19:18 +02:00
parent aceb6ee14c
commit 034f048883
4 changed files with 18 additions and 3 deletions

View File

@ -29,12 +29,12 @@ export const A = ({
replace, replace,
children, children,
...props ...props
}: TextProps & { href: string; replace?: boolean; children: ReactNode }) => { }: TextProps & { href?: string; replace?: boolean; children: ReactNode }) => {
const { css, theme } = useYoshiki(); const { css, theme } = useYoshiki();
return ( return (
<TextLink <TextLink
href={href} href={href ?? ""}
replace={replace as any} replace={replace as any}
experimental={ experimental={
replace replace

View File

@ -199,6 +199,7 @@ export const NavbarRight = () => {
export const Navbar = (props: Stylable) => { export const Navbar = (props: Stylable) => {
const { css, theme } = useYoshiki(); const { css, theme } = useYoshiki();
const { t } = useTranslation();
return ( return (
<Header <Header
@ -223,7 +224,19 @@ export const Navbar = (props: Stylable) => {
props, props,
)} )}
> >
<View {...css({ flexDirection: "row" })}>
<NavbarTitle {...css({ marginX: ts(2) })} /> <NavbarTitle {...css({ marginX: ts(2) })} />
<A
href="/browse"
{...css({
textTransform: "uppercase",
fontWeight: "bold",
color: (theme) => theme.contrast,
})}
>
{t("navbar.browse")}
</A>
</View>
<View <View
{...css({ {...css({
flexGrow: 1, flexGrow: 1,

View File

@ -42,6 +42,7 @@
}, },
"navbar": { "navbar": {
"home": "Home", "home": "Home",
"browse": "Browse",
"search": "Search", "search": "Search",
"login": "Login" "login": "Login"
}, },

View File

@ -42,6 +42,7 @@
}, },
"navbar": { "navbar": {
"home": "Accueil", "home": "Accueil",
"browse": "Liste",
"search": "Rechercher", "search": "Rechercher",
"login": "Connexion" "login": "Connexion"
}, },