diff --git a/app/apply/page.tsx b/app/apply/page.tsx index 1ac0232..725f9cf 100644 --- a/app/apply/page.tsx +++ b/app/apply/page.tsx @@ -1,30 +1,45 @@ -import Link from "next/link"; -import PublicLayout from "@/components/layout/PublicLayout"; +import { useState } from "react"; -export default function ApplyPage() { +const cards = [ + { id: "startup", label: "STARTUP\nAPPLICATION", href: "/apply/startup" }, + { id: "org", label: "ORG/COMPANY\nPROJECT FORM", href: "/apply/org" }, + { id: "student", label: "STUDENT/PRODUCT\nTEAM SKILLS FORM [Mock for now]", href: "#" }, +]; + +export default function StrategicLeadersPage() { return ( - -
-

Apply

-

- Choose the application you want to start. +

+ +
+
+ +
+

+ Apply to Join a Private
+ + Network of Strategic Leaders + + +

+

+ Learn from our executive strategy playbook
+ and get access to our network of strategic leaders.

+
-
-

Application Types

-
- - Startup Application - - - Org Application - - - Team Application - -
-
+
+ {cards.map((card) => ( + + + {card.label} + + + ))}
- +
); } \ No newline at end of file diff --git a/app/apply/startup/page.tsx b/app/apply/startup/page.tsx index 53ea0ad..77b9f3e 100644 --- a/app/apply/startup/page.tsx +++ b/app/apply/startup/page.tsx @@ -25,14 +25,45 @@ export default function StartupApplyPage() { fundingSiteUrl: "", contact: "", }); + const [loading, setLoading] = useState(false); + const [status, setStatus] = useState<"idle" | "success" | "error">("idle"); function updateField(key: K, value: StartupFormState[K]) { setForm((prev) => ({ ...prev, [key]: value })); } - function handleSubmit(e: React.FormEvent) { + async function handleSubmit(e: React.FormEvent) { e.preventDefault(); - console.log("Startup application form:", form); + setLoading(true); + setStatus("idle"); + + try { + const res = await fetch("/api/applications/startup", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ + StartupName : form.name, + StartupDescription : form.description, + StartupFundingGoal : form.fundingGoal, + StartupContact : form.contact, + }), + }); + if (!res.ok) { + throw new Error("Failed to submit application"); + } + setStatus("success"); + setForm({ + name: "", + description: "", + fundingGoal: "", + contact: "", + }); + } catch (err) { + console.error(err); + setStatus("error"); + } finally { + setLoading(false); + } } return ( diff --git a/app/leaders/page.tsx b/app/leaders/page.tsx index 4e7fa36..92eabe9 100644 --- a/app/leaders/page.tsx +++ b/app/leaders/page.tsx @@ -1,3 +1,5 @@ +'use client'; + import React from 'react'; import LeaderCard2 from '@/components/ui/LeaderCard2'; import PublicLayout from '@/components/layout/PublicLayout'; @@ -55,7 +57,6 @@ const team = [ export default function Leaders() { return ( -
- {name}