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") || "", 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; + } }