;
jobType: JobType;
}>;
@@ -442,6 +444,7 @@ type OfferDetailsFormArrayProps = Readonly<{
function OfferDetailsFormArray({
fieldArrayValues,
jobType,
+ defaultCurrency,
}: OfferDetailsFormArrayProps) {
const { append, remove, fields } = fieldArrayValues;
@@ -451,9 +454,17 @@ function OfferDetailsFormArray({
return (
{jobType === JobType.FULLTIME ? (
-
+
) : (
-
+
)}
);
@@ -476,7 +487,13 @@ function OfferDetailsFormArray({
);
}
-export default function OfferDetailsForm() {
+type OfferDetailsFormProps = Readonly<{
+ defaultCurrency: string;
+}>;
+
+export default function OfferDetailsForm({
+ defaultCurrency,
+}: OfferDetailsFormProps) {
const watchJobType = useWatch({
name: `offers.0.jobType`,
});
@@ -515,6 +532,7 @@ export default function OfferDetailsForm() {
}}
/>
diff --git a/apps/portal/src/pages/offers/profile/edit/[offerProfileId].tsx b/apps/portal/src/pages/offers/profile/edit/[offerProfileId].tsx
index 647e5c8f..338eb067 100644
--- a/apps/portal/src/pages/offers/profile/edit/[offerProfileId].tsx
+++ b/apps/portal/src/pages/offers/profile/edit/[offerProfileId].tsx
@@ -1,3 +1,4 @@
+import type { GetServerSideProps, InferGetServerSidePropsType } from 'next';
import Error from 'next/error';
import Head from 'next/head';
import { useRouter } from 'next/router';
@@ -14,7 +15,17 @@ import { getProfilePath } from '~/utils/offers/link';
import { convertToMonthYear } from '~/utils/offers/time';
import { trpc } from '~/utils/trpc';
-export default function OffersEditPage() {
+export const getServerSideProps: GetServerSideProps = async ({ req }) => {
+ return {
+ props: {
+ country: req.cookies.country ?? null,
+ },
+ };
+};
+
+export default function OffersEditPage({
+ country,
+}: InferGetServerSidePropsType) {
const [initialData, setInitialData] = useState();
const router = useRouter();
const { offerProfileId, token = '' } = router.query;
@@ -104,6 +115,7 @@ export default function OffersEditPage() {
)}
{!getProfileResult.isLoading && initialData && (
{
+ return {
+ props: {
+ country: req.cookies.country ?? null,
+ },
+ };
+};
+
+export default function OffersSubmissionPage({
+ country,
+}: InferGetServerSidePropsType) {
return (
<>
Analyze your offers
-
+
>
);
}