refactor: update register company page and success message; improve imports and localization
This commit is contained in:
@@ -4,19 +4,20 @@ import React from 'react';
|
|||||||
|
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
|
|
||||||
import { MedReportLogo } from "@/components/med-report-title";
|
import { MedReportLogo } from '@/components/med-report-title';
|
||||||
import React from "react";
|
import { SubmitButton } from '@/components/ui/submit-button';
|
||||||
import { yupResolver } from "@hookform/resolvers/yup";
|
import { sendCompanyOfferEmail } from '@/lib/services/mailer.service';
|
||||||
import { useForm } from "react-hook-form";
|
import { submitCompanyRegistration } from '@/lib/services/register-company.service';
|
||||||
import { companySchema } from "@/lib/validations/companySchema";
|
import { CompanySubmitData } from '@/lib/types/company';
|
||||||
import { CompanySubmitData } from "@/lib/types/company";
|
import { companySchema } from '@/lib/validations/companySchema';
|
||||||
import { submitCompanyRegistration } from "@/lib/services/register-company.service";
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { useRouter } from "next/navigation";
|
import { useForm } from 'react-hook-form';
|
||||||
import { Label } from "@kit/ui/label";
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Input } from "@kit/ui/input";
|
|
||||||
import { SubmitButton } from "@/components/ui/submit-button";
|
import { FormItem } from '@kit/ui/form';
|
||||||
import { FormItem } from "@kit/ui/form";
|
import { Input } from '@kit/ui/input';
|
||||||
import { Trans } from "@kit/ui/trans";
|
import { Label } from '@kit/ui/label';
|
||||||
|
import { Trans } from '@kit/ui/trans';
|
||||||
|
|
||||||
export default function RegisterCompany() {
|
export default function RegisterCompany() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -52,7 +53,7 @@ export default function RegisterCompany() {
|
|||||||
return (
|
return (
|
||||||
<div className="border-border flex max-w-5xl flex-row overflow-hidden rounded-3xl border">
|
<div className="border-border flex max-w-5xl flex-row overflow-hidden rounded-3xl border">
|
||||||
<div className="flex w-1/2 flex-col px-12 py-14 text-center">
|
<div className="flex w-1/2 flex-col px-12 py-14 text-center">
|
||||||
<MedReportTitle />
|
<MedReportLogo />
|
||||||
<h1 className="pt-8">
|
<h1 className="pt-8">
|
||||||
<Trans i18nKey={'account:requestCompanyAccount:title'} />
|
<Trans i18nKey={'account:requestCompanyAccount:title'} />
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
import { MedReportLogo } from '@/components/med-report-title';
|
import { MedReportLogo } from '@/components/med-report-title';
|
||||||
|
|
||||||
import { Button } from '@kit/ui/button';
|
import { Button } from '@kit/ui/button';
|
||||||
|
import { Trans } from '@kit/ui/trans';
|
||||||
|
|
||||||
export default function CompanyRegistrationSuccess() {
|
export default function CompanyRegistrationSuccess() {
|
||||||
return (
|
return (
|
||||||
<div className="border-border rounded-3xl border px-16 pt-4 pb-12">
|
<div className="border-border rounded-3xl border px-16 pt-4 pb-12">
|
||||||
<MedReportTitle />
|
<MedReportLogo />
|
||||||
<div className="flex flex-col items-center px-4">
|
<div className="flex flex-col items-center px-4">
|
||||||
<Image
|
<Image
|
||||||
src="/assets/success.png"
|
src="/assets/success.png"
|
||||||
@@ -18,15 +21,15 @@ export default function CompanyRegistrationSuccess() {
|
|||||||
height={195}
|
height={195}
|
||||||
/>
|
/>
|
||||||
<h1 className="pb-2">
|
<h1 className="pb-2">
|
||||||
<Trans i18nKey={'account:requestCompanyAccount:successTitle'} />
|
<Trans i18nKey="account:requestCompanyAccount:successTitle" />
|
||||||
</h1>
|
</h1>
|
||||||
<p className="text-muted-foreground text-sm">
|
<p className="text-muted-foreground text-sm">
|
||||||
<Trans i18nKey={'account:requestCompanyAccount:successDescription'} />
|
<Trans i18nKey="account:requestCompanyAccount:successDescription" />
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Button className="mt-8 w-full">
|
<Button className="mt-8 w-full">
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
<Trans i18nKey={'account:requestCompanyAccount:successButton'} />
|
<Trans i18nKey="account:requestCompanyAccount:successButton" />
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -112,5 +112,8 @@
|
|||||||
"noTeamsYet": "You don't have any teams yet.",
|
"noTeamsYet": "You don't have any teams yet.",
|
||||||
"createTeam": "Create a team to get started.",
|
"createTeam": "Create a team to get started.",
|
||||||
"createTeamButtonLabel": "Create a Team",
|
"createTeamButtonLabel": "Create a Team",
|
||||||
"createCompanyAccount": "Create Company Account"
|
"createCompanyAccount": "Create Company Account",
|
||||||
|
"requestCompanyAccount": {
|
||||||
|
"title": "Company details"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user