diff --git a/src/app/business/apply/page.tsx b/src/app/business/apply/page.tsx index 6eab724..cd7dbc6 100644 --- a/src/app/business/apply/page.tsx +++ b/src/app/business/apply/page.tsx @@ -15,7 +15,6 @@ const BUCKET_PITCH_NAME = "business-application"; let supabase = createSupabaseClient(); export default function ApplyBusiness() { - const [applyProject, setApplyProject] = useState(false); const alertShownRef = useRef(false); const [success, setSucess] = useState(false); @@ -75,12 +74,8 @@ export default function ApplyBusiness() { text: error == null ? "Your application has been submitted" : error.message, confirmButtonColor: error == null ? "green" : "red", - }).then((result) => { - if (result.isConfirmed && applyProject) { - window.location.href = "/project/apply"; - } else { - window.location.href = "/"; - } + }).then(() => { + window.location.href = "/"; }); }; @@ -98,7 +93,10 @@ export default function ApplyBusiness() { console.error(error); console.error(applicationError); } - if ((business && business.length != 0) || (businessApplication && businessApplication.length != 0)) { + if ( + (business && business.length != 0) || + (businessApplication && businessApplication.length != 0) + ) { return true; } return false; @@ -156,8 +154,8 @@ export default function ApplyBusiness() { console.error("Error fetching user ID:", error); } }; - // setSucess(true); - fetchUserData(); + setSucess(true); + // fetchUserData(); }, []); return ( @@ -180,11 +178,7 @@ export default function ApplyBusiness() { {/* form */} {/*
*/} - + ); } diff --git a/src/components/BusinessForm.tsx b/src/components/BusinessForm.tsx index ced01a8..dd0fdc5 100644 --- a/src/components/BusinessForm.tsx +++ b/src/components/BusinessForm.tsx @@ -17,25 +17,14 @@ import { businessFormSchema } from "@/types/schemas/application.schema"; import { z } from "zod"; import { zodResolver } from "@hookform/resolvers/zod"; import { Label } from "@/components/ui/label"; -import { Switch } from "@/components/ui/switch"; -import { - Tooltip, - TooltipContent, - TooltipProvider, - TooltipTrigger, -} from "@radix-ui/react-tooltip"; import { createSupabaseClient } from "@/lib/supabase/clientComponentClient"; type businessSchema = z.infer; interface BusinessFormProps { - applyProject: boolean; - setApplyProject: Function; onSubmit: SubmitHandler; } const BusinessForm = ({ - applyProject, - setApplyProject, onSubmit, }: BusinessFormProps & { onSubmit: SubmitHandler }) => { const communitySize = [ @@ -461,28 +450,6 @@ const BusinessForm = ({ )} /> -
- setApplyProject(!applyProject)} - > - - - - - Would you like to apply for your first fundraising project - as well? - - - -

- Toggling this option allows you to begin your first - project,
which is crucial for unlocking the tools - necessary to raise funds. -

-
-
-
-