From d10730e1c8d2aa31c2dd47ae3c27fec33db0d859 Mon Sep 17 00:00:00 2001 From: arturasmckwcz Date: Mon, 13 Apr 2026 08:56:02 +0000 Subject: [PATCH 1/2] fix: rollback to local forms --- src/components/forms/index.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/forms/index.tsx b/src/components/forms/index.tsx index f0c4ae1..0fb59c0 100644 --- a/src/components/forms/index.tsx +++ b/src/components/forms/index.tsx @@ -1,6 +1,5 @@ -import { Lang } from "need4deed-sdk"; -import { useTranslation } from "react-i18next"; -import { getExternalUrl } from "../../utils"; +import AddOpportunity from "./AddOpportunity"; +import BecomeVolunteer from "./BecomeVolunteer"; import { FormType } from "./types"; interface Props { @@ -8,9 +7,12 @@ interface Props { } export default function Form({ form }: Props) { - const { i18n } = useTranslation(); - - const to = getExternalUrl(i18n.language as Lang, form); - window.location.replace(to); - return null; + switch (form) { + case FormType.VOLUNTEER: + return ; + case FormType.OPPORTUNITY: + return ; + default: + return null; + } } From 6d013232249aa2810d71b91902a5762e1d6874fd Mon Sep 17 00:00:00 2001 From: arturasmckwcz Date: Mon, 13 Apr 2026 09:07:14 +0000 Subject: [PATCH 2/2] fix: remove lecgacy --- src/components/OpportunityCards/OpportunityCards.tsx | 2 +- src/components/forms/AddOpportunity/index.tsx | 2 +- src/components/forms/BecomeVolunteer/index.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/OpportunityCards/OpportunityCards.tsx b/src/components/OpportunityCards/OpportunityCards.tsx index ba91dd6..adfac2e 100644 --- a/src/components/OpportunityCards/OpportunityCards.tsx +++ b/src/components/OpportunityCards/OpportunityCards.tsx @@ -90,7 +90,7 @@ export function OpportunityCards() { {selectedTabIndex === 0 ? ( - >({ url: `${urlApi}/api/opportunity/legacy` }); + >({ url: `${urlApi}/api/opportunity/` }); const formOpportunity = useForm({ defaultValues: { diff --git a/src/components/forms/BecomeVolunteer/index.tsx b/src/components/forms/BecomeVolunteer/index.tsx index 0ab8fab..6e9e822 100644 --- a/src/components/forms/BecomeVolunteer/index.tsx +++ b/src/components/forms/BecomeVolunteer/index.tsx @@ -48,7 +48,7 @@ export default function BecomeVolunteer() { const { postRequest } = usePostRequest< VolunteerParsedData, Record - >({ url: `${urlApi}/api/volunteer/legacy` }); + >({ url: `${urlApi}/api/volunteer/` }); const opportunity: OpportunityInfo = { id: opportunityParams.get("id") || "",