mirror of
https://github.com/temetro/temetro.git
synced 2026-08-19 22:56:17 +00:00
e0de20b551
Move all hardcoded UI strings in the appointments, prescriptions, tasks, messages, activity, analysis and patients views (plus their dialogs and detail sheets), the remaining auth pages (verify-email, forgot/reset password, accept-invite, onboarding), the clinic form and the sidebar user menu into i18next keys in en/translation.json. Clinical option values (appointment types, frequencies) stay canonical. English-only; no new locale yet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
32 lines
974 B
TypeScript
32 lines
974 B
TypeScript
"use client";
|
|
|
|
import { useRouter } from "next/navigation";
|
|
import { useEffect } from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import { AuthShell } from "@/components/auth/auth-ui";
|
|
import { CreateClinicForm } from "@/components/clinic/create-clinic-form";
|
|
import { authClient } from "@/lib/auth-client";
|
|
|
|
export default function OnboardingPage() {
|
|
const { t } = useTranslation();
|
|
const router = useRouter();
|
|
const { data: session, isPending } = authClient.useSession();
|
|
|
|
// Send unauthenticated users to login. Authenticated users (whether brand
|
|
// new or creating an additional clinic) stay on this page.
|
|
useEffect(() => {
|
|
if (isPending) return;
|
|
if (!session?.user) router.replace("/login");
|
|
}, [session, isPending, router]);
|
|
|
|
return (
|
|
<AuthShell
|
|
subtitle={t("auth.onboarding.subtitle")}
|
|
title={t("auth.onboarding.title")}
|
|
>
|
|
<CreateClinicForm onCreated={() => router.push("/")} />
|
|
</AuthShell>
|
|
);
|
|
}
|