From 1f2cb914b93f70020efe344c9235f6afaae5d829 Mon Sep 17 00:00:00 2001 From: Nnaji Benjamin <60315147+Benjtalkshow@users.noreply.github.com> Date: Wed, 4 Mar 2026 20:15:06 +0100 Subject: [PATCH 1/8] fix: improve timeline input , ui improvement and fixes for participation tab (#442) --- .../hackathons/new/tabs/ParticipantTab.tsx | 3 ++- .../new/tabs/components/timeline/DateTimeInput.tsx | 8 ++++---- .../new/tabs/schemas/participantSchema.ts | 13 +++++++++++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/components/organization/hackathons/new/tabs/ParticipantTab.tsx b/components/organization/hackathons/new/tabs/ParticipantTab.tsx index 730d227ce..5a149547a 100644 --- a/components/organization/hackathons/new/tabs/ParticipantTab.tsx +++ b/components/organization/hackathons/new/tabs/ParticipantTab.tsx @@ -300,7 +300,8 @@ export default function ParticipantTab({ /> {/* Team Size Settings */} - {participantType === 'team' && ( + {(participantType === 'team' || + participantType === 'team_or_individual') && (
diff --git a/components/organization/hackathons/new/tabs/components/timeline/DateTimeInput.tsx b/components/organization/hackathons/new/tabs/components/timeline/DateTimeInput.tsx
index 9f592e5f0..5dbe3b707 100644
--- a/components/organization/hackathons/new/tabs/components/timeline/DateTimeInput.tsx
+++ b/components/organization/hackathons/new/tabs/components/timeline/DateTimeInput.tsx
@@ -25,9 +25,9 @@ interface DateTimeInputProps {
const formatTimeValue = (date?: Date): string => {
if (!date) return '';
- const hours = `${date.getHours()}`.padStart(2, '0');
- const minutes = `${date.getMinutes()}`.padStart(2, '0');
- const seconds = `${date.getSeconds()}`.padStart(2, '0');
+ const hours = String(date.getHours()).padStart(2, '0');
+ const minutes = String(date.getMinutes()).padStart(2, '0');
+ const seconds = String(date.getSeconds()).padStart(2, '0');
return `${hours}:${minutes}:${seconds}`;
};
@@ -100,7 +100,7 @@ export default function DateTimeInput({
{
const timeValue = event.target.value;
diff --git a/components/organization/hackathons/new/tabs/schemas/participantSchema.ts b/components/organization/hackathons/new/tabs/schemas/participantSchema.ts
index a3df10165..5b6c558f6 100644
--- a/components/organization/hackathons/new/tabs/schemas/participantSchema.ts
+++ b/components/organization/hackathons/new/tabs/schemas/participantSchema.ts
@@ -52,6 +52,19 @@ export const participantSchema = z
});
}
}
+
+ // New validation: At least one submission requirement must be selected
+ if (
+ !data.require_github &&
+ !data.require_demo_video &&
+ !data.require_other_links
+ ) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ message: 'At least one submission requirement must be selected',
+ path: ['require_github'],
+ });
+ }
});
export type ParticipantFormData = z.input
- We encountered an unexpected error. Don't worry, our team has
- been notified and is working to fix it.
+ We encountered an unexpected error. If you have error reporting
+ enabled, our team has been notified. Otherwise, try again or contact
+ support.
+ We've recorded this error. Please try again or contact support if it
+ continues.
+
+
+ Go to home
+
+
+ Use the messages icon in the header to open your conversations, or
+ select a conversation above.
+
+ Something went wrong
+
+