improvement: fdi tooth chart selection modes polished. bugs related to teeth selecyion fixed.
This commit is contained in:
@@ -76,6 +76,15 @@ export default function DashboardLayout({ children }: { children: React.ReactNod
|
||||
);
|
||||
}
|
||||
|
||||
// Do not mount clinic-only pages for lab orgs (avoids PERMISSION_CLINIC_ONLY toasts during redirect).
|
||||
if (!canAccessDashboardRoute(currentOrganization, pathname)) {
|
||||
return (
|
||||
<div className="h-screen flex items-center justify-center app-web-bg">
|
||||
{t('loadingWorkspace')}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<ToastProvider>
|
||||
<div className="app-dashboard-shell flex h-[100dvh] app-web-bg text-text-primary">
|
||||
|
||||
@@ -11,10 +11,10 @@ export default function HomePage() {
|
||||
const t = useTranslations('landing');
|
||||
const tAuth = useTranslations('auth');
|
||||
const tCommon = useTranslations('common');
|
||||
const { user } = useAuth();
|
||||
const { user, isAuthReady } = useAuth();
|
||||
|
||||
return (
|
||||
<div className="min-h-[100dvh] app-web-bg text-text-primary">
|
||||
<div className="min-h-[100dvh] flex flex-col app-web-bg text-text-primary">
|
||||
<header className="border-b border-border/70 bg-background-secondary/65 backdrop-blur-sm fixed top-0 w-full z-10">
|
||||
<div className="container mx-auto px-4 py-3 sm:py-4 flex flex-wrap items-center justify-between gap-x-4 gap-y-3">
|
||||
<Link href="/" className="text-xl sm:text-2xl font-semibold text-text-primary shrink-0">
|
||||
@@ -23,7 +23,9 @@ export default function HomePage() {
|
||||
|
||||
<div className="flex items-center gap-1.5 sm:gap-3 ml-auto shrink-0">
|
||||
<TopBarControls />
|
||||
{user ? (
|
||||
{!isAuthReady ? (
|
||||
<span className="inline-block h-9 w-24 sm:w-28 rounded-[var(--radius-md)] bg-background-card/60 animate-pulse" aria-hidden />
|
||||
) : user ? (
|
||||
<Link href="/today">
|
||||
<Button variant="primary" size="sm" className="sm:px-4 sm:py-2 sm:text-sm">
|
||||
{tAuth('dashboard')}
|
||||
@@ -48,7 +50,7 @@ export default function HomePage() {
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main className="container mx-auto px-4 pt-28 sm:pt-32 pb-16 sm:pb-20">
|
||||
<main className="flex-1 container mx-auto px-4 pt-28 sm:pt-32 pb-16 sm:pb-20">
|
||||
<div className="max-w-4xl mx-auto text-center">
|
||||
<h1 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-semibold mb-4 sm:mb-6 leading-tight">
|
||||
{t('heroTitle')}
|
||||
@@ -59,7 +61,7 @@ export default function HomePage() {
|
||||
{t('heroSubtitle')}
|
||||
</p>
|
||||
|
||||
{!user && (
|
||||
{isAuthReady && !user && (
|
||||
<div className="flex flex-col sm:flex-row items-stretch sm:items-center justify-center gap-3">
|
||||
<Link href="/register" className="w-full sm:w-auto">
|
||||
<Button size="lg" variant="primary" fullWidth className="sm:w-auto sm:px-8">
|
||||
@@ -109,7 +111,7 @@ export default function HomePage() {
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer className="border-t border-border/70 bg-background-secondary/80">
|
||||
<footer className="mt-auto border-t border-border/70 bg-background-secondary/80">
|
||||
<div className="container mx-auto px-4 py-8 flex flex-col md:flex-row justify-between items-center text-sm text-text-secondary">
|
||||
<div>{t('footerCopyright')}</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user