Skip to content

Commit 1e5b881

Browse files
committed
fix: align team hero fallback action
1 parent ba6607f commit 1e5b881

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

pages/hackathon/[id]/team/[tid].tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,13 @@ const ProjectPage: FC<ProjectPageProps> = observer(
182182
scoreText ? `${t('score')} · ${scoreText}` : '',
183183
].filter(Boolean);
184184
const creatorText = [creator?.name, creator?.email].filter(Boolean).join(' · ');
185+
const heroPrimaryAction = primaryForm
186+
? {
187+
label: t('hackathon_register_now'),
188+
href: primaryForm.shared_url,
189+
external: true as const,
190+
}
191+
: { label: t('hackathon_detail'), href: ActivityModel.getLink(activity) };
185192

186193
return (
187194
<>
@@ -208,15 +215,7 @@ const ProjectPage: FC<ProjectPageProps> = observer(
208215
locationText={locationText}
209216
name={`${displayTitle} ${t('hackathon_team_showcase')}`}
210217
navigation={navigation}
211-
primaryAction={
212-
primaryForm
213-
? {
214-
label: t('hackathon_register_now'),
215-
href: primaryForm.shared_url,
216-
external: true,
217-
}
218-
: { label: t('hackathon_register_now'), href: ActivityModel.getLink(activity) }
219-
}
218+
primaryAction={heroPrimaryAction}
220219
secondaryAction={{ label: t('team_works'), href: '#works' }}
221220
chips={heroChips}
222221
subtitle={activityName as string}

0 commit comments

Comments
 (0)