Skip to content

Commit ba6607f

Browse files
committed
fix: align hackathon hero fallback action
1 parent 1b47f1a commit ba6607f

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

pages/hackathon/[id].tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,13 @@ const HackathonDetail: FC<HackathonDetailProps> = observer(
243243
formGroups.find(({ key }) => key === 'Person') ||
244244
formGroups.find(({ key }) => key === 'Project') ||
245245
formGroups[0];
246+
const heroPrimaryAction = primaryForm
247+
? {
248+
label: heroPrimaryActionLabel,
249+
href: primaryForm.links[0].href,
250+
external: true as const,
251+
}
252+
: { label: t('event_description'), href: '#overview' };
246253
const secondaryForm =
247254
formGroups.find(({ key }) => key === 'Project' && key !== primaryForm?.key) ||
248255
formGroups.find(({ key }) => key !== primaryForm?.key);
@@ -344,15 +351,7 @@ const HackathonDetail: FC<HackathonDetailProps> = observer(
344351
locationText={locationText}
345352
name={name as string}
346353
navigation={heroNavigation(i18n)}
347-
primaryAction={
348-
primaryForm
349-
? {
350-
label: heroPrimaryActionLabel,
351-
href: primaryForm.links[0].href,
352-
external: true,
353-
}
354-
: { label: heroPrimaryActionLabel, href: '#entry-hub' }
355-
}
354+
primaryAction={heroPrimaryAction}
356355
secondaryAction={{ label: t('agenda'), href: '#schedule' }}
357356
chips={heroStatChips}
358357
subtitle={(activityType as string) || t('hackathon_detail')}

0 commit comments

Comments
 (0)