Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions app/apply/org/page.tsx

This file was deleted.

126 changes: 126 additions & 0 deletions app/apply/organization/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
"use client";

import { useState } from "react";
import PublicLayout from "@/components/layout/PublicLayout";

type ProjectFormState = {
companyName: string;
projectTitle: string;
budget: string;
description: string;
};

export default function CompanyProjectPage() {
const [form, setForm] = useState<ProjectFormState>({
companyName: "",
projectTitle: "",
budget: "",
description: "",
});

function updateField<K extends keyof ProjectFormState>(
key: K,
value: string,
) {
setForm((prev) => ({ ...prev, [key]: value }));
}

function handleSubmit(e: React.FormEvent) {
e.preventDefault();
console.log("Submitting Company Project:", form);
alert("Project details logged to console!");
}

return (
<PublicLayout>
<div className="mx-auto max-w-2xl px-6 py-12">
<header className="mb-10">
<h1 className="text-3xl font-bold text-gray-900">
New Company Project
</h1>
<p className="mt-2 text-gray-600">
Submit your project proposal for review. All fields are required.
</p>
</header>

<form onSubmit={handleSubmit} className="space-y-6">
{/* Company Name Field */}
<div className="flex flex-col gap-2">
<label htmlFor="companyName" className="text-sm font-semibold">
Company / Organization Name
</label>
<input
id="companyName"
type="text"
required
value={form.companyName}
onChange={(e) => updateField("companyName", e.target.value)}
className="rounded-md border border-gray-300 px-3 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"
placeholder="Acme Corp"
/>
</div>

<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
{/* Project Title Field */}
<div className="flex flex-col gap-2">
<label htmlFor="projectTitle" className="text-sm font-semibold">
Project Title
</label>
<input
id="projectTitle"
type="text"
required
value={form.projectTitle}
onChange={(e) => updateField("projectTitle", e.target.value)}
className="rounded-md border border-gray-300 px-3 py-2"
placeholder="Internal CRM Redesign"
/>
</div>
</div>

{/* Budget Field */}
<div className="flex flex-col gap-2">
<label htmlFor="budget" className="text-sm font-semibold">
Estimated Budget
</label>
<input
id="budget"
type="text"
required
value={form.budget}
onChange={(e) => updateField("budget", e.target.value)}
className="rounded-md border border-gray-300 px-3 py-2"
placeholder="e.g. $25,000"
/>
</div>

{/* Description Field */}
<div className="flex flex-col gap-2">
<label htmlFor="description" className="text-sm font-semibold">
Project Description
</label>
<textarea
id="description"
required
rows={4}
value={form.description}
onChange={(e) => updateField("description", e.target.value)}
className="rounded-md border border-gray-300 px-3 py-2"
placeholder="Outline the main objectives and deliverables..."
/>
</div>

{/* Form Actions */}
<div className="pt-4">
<button
type="submit"
className="w-full rounded-md bg-blue-600 px-4 py-2 text-white font-medium hover:bg-blue-700 transition-colors"
>
Submit
</button>
</div>
</form>
</div>
</PublicLayout>
);
}
17 changes: 13 additions & 4 deletions app/apply/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,27 @@ export default function ApplyPage() {
<section className="mt-10">
<h2 className="text-2xl font-semibold mb-3">Application Types</h2>
<div className="flex flex-col gap-4">
<Link href="/apply/startup" className="underline text-gray-700 hover:text-black">
<Link
href="/apply/startup"
className="underline text-gray-700 hover:text-black"
>
Startup Application
</Link>
<Link href="/apply/org" className="underline text-gray-700 hover:text-black">
<Link
href="/apply/organization"
className="underline text-gray-700 hover:text-black"
>
Org Application
</Link>
<Link href="/apply/team" className="underline text-gray-700 hover:text-black">
<Link
href="/apply/team"
className="underline text-gray-700 hover:text-black"
>
Team Application
</Link>
</div>
</section>
</div>
</PublicLayout>
);
}
}
1 change: 1 addition & 0 deletions auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export const { auth, handlers, signIn, signOut } = NextAuth({
strategy: "jwt",
maxAge: 30 * 24 * 60 * 60, // 30 days
},
secret: process.env.AUTH_SECRET,
});
2 changes: 1 addition & 1 deletion components/layout/PublicLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function PublicLayout({
<main>{children}</main>

<footer>
<h3>Public Footer</h3>
<h3>Footer placeholder</h3>
</footer>
</>
);
Expand Down
Loading