feature: localization's first implmentation done. all frontend hardcoded text is now localized.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { Building2, Mail } from 'lucide-react';
|
||||
import type { FieldErrors, UseFormRegister, UseFormSetValue } from 'react-hook-form';
|
||||
import { Input } from '@/components/ui/shared/Input';
|
||||
@@ -23,26 +24,28 @@ export function OrganizationDetailsFields({
|
||||
organizationType,
|
||||
setValue,
|
||||
}: OrganizationDetailsFieldsProps) {
|
||||
const t = useTranslations('auth');
|
||||
|
||||
return (
|
||||
<>
|
||||
<Input
|
||||
label="Organization name"
|
||||
label={t('organizationName')}
|
||||
{...register('organizationName')}
|
||||
placeholder="Sunshine Dental Clinic"
|
||||
placeholder={t('organizationNamePlaceholder')}
|
||||
error={errors.organizationName?.message}
|
||||
icon={<Building2 className="h-5 w-5 icon-flat" />}
|
||||
/>
|
||||
<Input
|
||||
label="Organization email"
|
||||
label={t('organizationEmail')}
|
||||
{...register('organizationEmail')}
|
||||
type="email"
|
||||
placeholder="contact@sunshineclinic.com"
|
||||
placeholder={t('organizationEmailPlaceholder')}
|
||||
error={errors.organizationEmail?.message}
|
||||
icon={<Mail className="h-5 w-5 icon-flat" />}
|
||||
/>
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-text-secondary mb-2">
|
||||
Organization type
|
||||
{t('organizationType')}
|
||||
</label>
|
||||
<input type="hidden" {...register('organizationType')} />
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
@@ -58,7 +61,7 @@ export function OrganizationDetailsFields({
|
||||
}`}
|
||||
>
|
||||
<Building2 className="h-8 w-8 mx-auto mb-2 icon-flat" />
|
||||
<span className="text-sm font-medium">Dental Clinic</span>
|
||||
<span className="text-sm font-medium">{t('dentalClinic')}</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@@ -72,7 +75,7 @@ export function OrganizationDetailsFields({
|
||||
}`}
|
||||
>
|
||||
<Building2 className="h-8 w-8 mx-auto mb-2 icon-flat" />
|
||||
<span className="text-sm font-medium">Dental Lab</span>
|
||||
<span className="text-sm font-medium">{t('dentalLab')}</span>
|
||||
</button>
|
||||
</div>
|
||||
{errors.organizationType && (
|
||||
|
||||
Reference in New Issue
Block a user