[offers][feat] Add currency detection in forms (#542)
* [offers][feat] Tweak OEA text * [offers][feat] Add currency detection in formspull/544/head
parent
247a60efab
commit
fd97f25de1
@ -1,14 +0,0 @@
|
||||
import Head from 'next/head';
|
||||
|
||||
import OffersSubmissionForm from '~/components/offers/offersSubmission/OffersSubmissionForm';
|
||||
|
||||
export default function OffersSubmissionPage() {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Analyze your offers</title>
|
||||
</Head>
|
||||
<OffersSubmissionForm />
|
||||
</>
|
||||
);
|
||||
}
|
@ -1,14 +1,25 @@
|
||||
import type { GetServerSideProps, InferGetServerSidePropsType } from 'next';
|
||||
import Head from 'next/head';
|
||||
|
||||
import OffersSubmissionForm from '~/components/offers/offersSubmission/OffersSubmissionForm';
|
||||
|
||||
export default function OffersSubmissionPage() {
|
||||
export const getServerSideProps: GetServerSideProps = async ({ req }) => {
|
||||
return {
|
||||
props: {
|
||||
country: req.cookies.country ?? null,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default function OffersSubmissionPage({
|
||||
country,
|
||||
}: InferGetServerSidePropsType<typeof getServerSideProps>) {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Analyze your offers</title>
|
||||
</Head>
|
||||
<OffersSubmissionForm />
|
||||
<OffersSubmissionForm country={country} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in new issue