feat: localize tank search

This commit is contained in:
tresabhi committed 2025-01-13 20:06:43 -06:00
1 parent 06cbe1e733
commit ade6ec8af1
5 files changed
+21 -6

No files matched your search

+3 -1
View File
@@ -1,10 +1,12 @@
import { DEFAULT_LOCALE } from '@blitzkit/core';
import { Link, type LinkProps } from '@radix-ui/themes';
import type { LocaleAcceptorProps } from '../hooks/useLocale';
type LinkI18nProps = LinkProps & LocaleAcceptorProps;
export function LinkI18n({ locale, href, ...props }: LinkI18nProps) {
const prefix = locale === undefined ? '' : `/${locale}`;
const prefix =
locale === undefined || locale === DEFAULT_LOCALE ? '' : `/${locale}`;
return (
<Link href={href?.startsWith('/') ? `${prefix}${href}` : href} {...props} />