Skip to content
Merged
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
22 changes: 19 additions & 3 deletions app/api/dsoc/applications/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,27 @@ async function getMenteeFromToken(request: NextRequest) {
}
}

function getDeadlineEnd(dateString: string) {
const [year, month, day] = dateString.split('-').map(Number);
function getDeadlineEnd(dateValue: string | Date) {
if (dateValue instanceof Date) {
return new Date(
dateValue.getFullYear(),
dateValue.getMonth(),
dateValue.getDate(),
23,
59,
59,
999
);
}

if (typeof dateValue !== 'string') {
return new Date(dateValue as unknown as string);
}

const [year, month, day] = dateValue.split('-').map(Number);

if (!year || !month || !day) {
return new Date(dateString);
return new Date(dateValue);
}

return new Date(year, month - 1, day, 23, 59, 59, 999);
Expand Down
2 changes: 1 addition & 1 deletion app/dsoc/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export default function DSOCPage() {
<div className="inline-block mb-8">
<div className="neo-brutal-badge bg-[var(--dsoc-primary)] text-white px-6 py-2 text-base font-bold">
<Zap className="w-5 h-5 mr-2" />
DSOC 2026 — Applications Open March 2026
DSOC 2026 — Applications Open May 2026
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions app/dsoc/projects/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ export default function ProjectDetailPage({ params }: { params: Promise<{ id: st
</div>

{project.timelineUrl && (
<div className="neo-brutal-card p-6 bg-[var(--dsoc-secondary)] text-white border-[var(--dsoc-dark)]">
<div className="neo-brutal-card p-6">
<div className="flex items-start justify-between gap-4">
<div>
<h3 className="text-lg font-black flex items-center gap-2">
Expand All @@ -760,7 +760,7 @@ export default function ProjectDetailPage({ params }: { params: Promise<{ id: st
)}

{/* Discord Card */}
<div className="neo-brutal-card p-6 dsoc-discord-card">
<div className="neo-brutal-card p-6">
<div className="text-[var(--dsoc-dark)] dark:text-[var(--dsoc-light)]">
<MessageCircle className="w-8 h-8 mb-3" />
<h3 className="font-bold text-lg mb-2">Have Questions?</h3>
Expand Down
Loading