- state/authStore: session subscription (initialize + onAuthStateChange), profile + roles load, recovery flag, URL failure; services/localeSync: profiles.locale <-> localeStore - routes: /login, /signup, /forgot-password, /reset-password, /auth/callback; guards RequireAuth (next=) and RedirectIfSignedIn; /app (dashboard), /app/account behind the guard - shell: AppLayout (desktop sidebar, light top bar, mobile drawer), SidebarNav, UserBadge, SignOutButton - account: personal / professional / preferences / security sections, one save each, Zod validation with i18n keys - ui: Icon, FormField, Notice, ButtonLink (buttonClassName shared), PasswordField, OAuthButtons (config-driven) - Home header: Mon espace / Se connecter when Supabase is configured; local tool routes untouched - i18n: auth.*, shell.*, dashboard.*, account.*, home.space.* in fr + en
18 lines
554 B
TypeScript
18 lines
554 B
TypeScript
import { Link, type LinkProps } from 'react-router-dom'
|
|
import { buttonClassName, type ButtonProps } from './Button'
|
|
|
|
export interface ButtonLinkProps extends LinkProps {
|
|
variant?: ButtonProps['variant']
|
|
size?: ButtonProps['size']
|
|
}
|
|
|
|
/** A router link that looks like a Button: navigation stays a link for the browser and assistive tech. */
|
|
export default function ButtonLink({
|
|
variant = 'primary',
|
|
size = 'md',
|
|
className = '',
|
|
...rest
|
|
}: ButtonLinkProps) {
|
|
return <Link className={buttonClassName(variant, size, className)} {...rest} />
|
|
}
|