Update page.tsx

This commit is contained in:
Marvin 2025-04-22 17:24:25 +02:00 committed by GitHub
parent e807e73354
commit a82ff5b2ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,6 +33,7 @@ import {
} from "@app/components/ui/form";
import { Alert, AlertDescription } from "@app/components/ui/alert";
import CreateSiteForm from "../[orgId]/settings/sites/CreateSiteForm";
import { useTranslations } from 'next-intl';
type Step = "org" | "site" | "resources";
@ -49,6 +50,8 @@ export default function StepperForm() {
const [isChecked, setIsChecked] = useState(false);
const [error, setError] = useState<string | null>(null);
const t = useTranslations();
const orgForm = useForm<z.infer<typeof orgSchema>>({
resolver: zodResolver(orgSchema),
defaultValues: {
@ -113,9 +116,9 @@ export default function StepperForm() {
<>
<Card>
<CardHeader>
<CardTitle>New Organization</CardTitle>
<CardTitle>{t('setupNewOrg')}</CardTitle>
<CardDescription>
Create your organization, site, and resources
{t('setupCreate')}
</CardDescription>
</CardHeader>
<CardContent>
@ -138,7 +141,7 @@ export default function StepperForm() {
: "text-muted-foreground"
}`}
>
Create Org
{t('setupCreateOrg')}
</span>
</div>
<div className="flex flex-col items-center">
@ -158,7 +161,7 @@ export default function StepperForm() {
: "text-muted-foreground"
}`}
>
Create Site
{t('setupCreateSite')}
</span>
</div>
<div className="flex flex-col items-center">
@ -178,7 +181,7 @@ export default function StepperForm() {
: "text-muted-foreground"
}`}
>
Create Resources
{t('setupCreateResources')}
</span>
</div>
</div>
@ -197,7 +200,7 @@ export default function StepperForm() {
render={({ field }) => (
<FormItem>
<FormLabel>
Organization Name
{t('setupOrgName')}
</FormLabel>
<FormControl>
<Input
@ -225,8 +228,7 @@ export default function StepperForm() {
</FormControl>
<FormMessage />
<FormDescription>
This is the display name for
your organization.
{t('setupDisplayName')}
</FormDescription>
</FormItem>
)}
@ -237,7 +239,7 @@ export default function StepperForm() {
render={({ field }) => (
<FormItem>
<FormLabel>
Organization ID
{t('setupOrgId')}
</FormLabel>
<FormControl>
<Input
@ -247,11 +249,7 @@ export default function StepperForm() {
</FormControl>
<FormMessage />
<FormDescription>
This is the unique
identifier for your
organization. This is
separate from the display
name.
{t('setupIdentifier')}
</FormDescription>
</FormItem>
)}
@ -260,9 +258,7 @@ export default function StepperForm() {
{orgIdTaken && (
<Alert variant="destructive">
<AlertDescription>
Organization ID is already
taken. Please choose a different
one.
{t('setupErrorIdentifier')}
</AlertDescription>
</Alert>
)}
@ -285,7 +281,7 @@ export default function StepperForm() {
orgIdTaken
}
>
Create Organization
{t('setupCreateOrg')}
</Button>
</div>
</form>