Files
carmanagement/apps/homepage/src/components/app-shell/ThemedAccountCreateLink.tsx
T
root fb7b4eefc1
Build & Push / Build & Push Docker Image (push) Failing after 2m50s
Test / Type Check (all packages) (push) Failing after 55s
Test / API Unit Tests (push) Has been skipped
Test / Homepage Unit Tests (push) Has been skipped
Test / Carplace Unit Tests (push) Has been skipped
Test / Admin Unit Tests (push) Has been skipped
Test / Dashboard Unit Tests (push) Has been skipped
Test / API Integration Tests (push) Has been skipped
fix bug#7
2026-07-20 01:01:21 -04:00

24 lines
772 B
TypeScript

'use client';
import { ActionLink } from '@/components/actions/ActionLink';
import { accountCreateUrl } from '@/lib/account-urls';
import type { Locale } from '@/lib/localization/config';
import type { ThemePreference } from '@/lib/theme/config';
import type { ComponentProps } from 'react';
import { useThemePreference } from './useThemePreference';
interface ThemedAccountCreateLinkProps
extends Omit<ComponentProps<typeof ActionLink>, 'href'> {
locale: Locale;
initialPreference: ThemePreference;
}
export function ThemedAccountCreateLink({
locale,
initialPreference,
...props
}: ThemedAccountCreateLinkProps) {
const preference = useThemePreference(initialPreference);
return <ActionLink href={accountCreateUrl(locale, preference)} {...props} />;
}