Skip to content

Commit 7f14036

Browse files
CopilotTechQuery
andcommitted
Fix TypeScript type issues in hackathon page
Co-authored-by: TechQuery <[email protected]>
1 parent a7d2168 commit 7f14036

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ NEXT_PUBLIC_LARK_APP_ID = cli_a8094a652022900d
77
NEXT_PUBLIC_LARK_WIKI_URL = https://open-source-bazaar.feishu.cn/wiki/space/7052192153363054596
88

99
NEXT_PUBLIC_STRAPI_API_HOST = https://china-ngo-db.onrender.com/api/
10+
11+
JWT_SECRET=dummy_secret_for_build_only

pages/hackathon/[id].tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const HackathonDetail: FC<HackathonDetailProps> = observer(({ hackathon }) => {
123123
</Col>
124124
<Col md={4} className="text-md-end mt-3 mt-md-0">
125125
<Badge bg={getTypeColor(item.type)} className="me-2 mb-2">
126-
{t(item.type)}
126+
{t(item.type as any)}
127127
</Badge>
128128
<div className="text-white-50 small mt-2">
129129
{formatDateTime(item.startedAt)} - {formatDateTime(item.endedAt)}
@@ -148,7 +148,7 @@ const HackathonDetail: FC<HackathonDetailProps> = observer(({ hackathon }) => {
148148
</div>
149149
<h5 className="text-white text-center mb-3">{person.name}</h5>
150150
<div className="text-white-50 small mb-2">
151-
<strong>{t('gender')}:</strong> {t(person.gender)}
151+
<strong>{t('gender')}:</strong> {t(person.gender as any)}
152152
</div>
153153
<div className="text-white-50 small mb-2">
154154
<strong>{t('age')}:</strong> {person.age}
@@ -231,7 +231,7 @@ const HackathonDetail: FC<HackathonDetailProps> = observer(({ hackathon }) => {
231231
<img src={prize.image} alt={prize.name} className={styles.prizeImage} />
232232
<h5 className="text-white mb-3">{prize.name}</h5>
233233
<div className="d-flex justify-content-between align-items-center mb-2">
234-
<Badge bg={getLevelColor(prize.level)}>{t(prize.level)}</Badge>
234+
<Badge bg={getLevelColor(prize.level)}>{t(prize.level as any)}</Badge>
235235
<span className="text-white fw-bold">¥{prize.price.toLocaleString()}</span>
236236
</div>
237237
<div className="text-white-50 small mb-2">

0 commit comments

Comments
 (0)