Skip to content

Commit

Permalink
Add browse link on home page
Browse files Browse the repository at this point in the history
  • Loading branch information
zoriya committed Oct 21, 2023
1 parent aceb6ee commit 034f048
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
4 changes: 2 additions & 2 deletions front/packages/primitives/src/links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ export const A = ({
replace,
children,
...props
}: TextProps & { href: string; replace?: boolean; children: ReactNode }) => {
}: TextProps & { href?: string; replace?: boolean; children: ReactNode }) => {
const { css, theme } = useYoshiki();

return (
<TextLink
href={href}
href={href ?? ""}
replace={replace as any}
experimental={
replace
Expand Down
15 changes: 14 additions & 1 deletion front/packages/ui/src/navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export const NavbarRight = () => {

export const Navbar = (props: Stylable) => {
const { css, theme } = useYoshiki();
const { t } = useTranslation();

return (
<Header
Expand All @@ -223,7 +224,19 @@ export const Navbar = (props: Stylable) => {
props,
)}
>
<NavbarTitle {...css({ marginX: ts(2) })} />
<View {...css({ flexDirection: "row" })}>
<NavbarTitle {...css({ marginX: ts(2) })} />
<A
href="/browse"
{...css({
textTransform: "uppercase",
fontWeight: "bold",
color: (theme) => theme.contrast,
})}
>
{t("navbar.browse")}
</A>
</View>
<View
{...css({
flexGrow: 1,
Expand Down
1 change: 1 addition & 0 deletions front/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
},
"navbar": {
"home": "Home",
"browse": "Browse",
"search": "Search",
"login": "Login"
},
Expand Down
1 change: 1 addition & 0 deletions front/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
},
"navbar": {
"home": "Accueil",
"browse": "Liste",
"search": "Rechercher",
"login": "Connexion"
},
Expand Down

0 comments on commit 034f048

Please sign in to comment.