|
1 | 1 | import { BiTableSchema, TableCellLocation, TableCellUser } from 'mobx-lark'; |
2 | 2 | import { observer } from 'mobx-react'; |
| 3 | +import Link from 'next/link'; |
3 | 4 | import { cache, compose, errorLogger } from 'next-ssr-middleware'; |
4 | 5 | import { FC, useContext } from 'react'; |
5 | 6 | import { Badge, Card, Col, Container, Row } from 'react-bootstrap'; |
@@ -34,7 +35,6 @@ export const getServerSideProps = compose<{ id: string }>( |
34 | 35 | async ({ params }) => { |
35 | 36 | const activity = await new ActivityModel().getOne(params!.id); |
36 | 37 |
|
37 | | - // @ts-expect-error Upstream compatibility |
38 | 38 | const { appId, tableIdMap } = activity.databaseSchema as BiTableSchema; |
39 | 39 |
|
40 | 40 | const [people, organizations, agenda, prizes, templates, projects] = await Promise.all([ |
@@ -199,11 +199,18 @@ const HackathonDetail: FC<HackathonDetailProps> = observer(({ activity, hackatho |
199 | 199 | <h2 className={styles.sectionTitle}>💡 {t('projects')}</h2> |
200 | 200 |
|
201 | 201 | <Row as="ul" className="list-unstyled mt-4 g-3" md={2} lg={3} xl={4}> |
202 | | - {projects.map(({ name, score, summary, createdBy, members }) => ( |
| 202 | + {projects.map(({ id, name, score, summary, createdBy, members }) => ( |
203 | 203 | <Col as="li" key={name as string}> |
204 | 204 | <Card className={styles.projectCard} body> |
205 | 205 | <div className="d-flex justify-content-between align-items-start mb-3"> |
206 | | - <h6 className="text-white flex-grow-1">{name as string}</h6> |
| 206 | + <h6 className="text-white flex-grow-1"> |
| 207 | + <Link |
| 208 | + className="stretched-link" |
| 209 | + href={`${ActivityModel.getLink(activity)}/team/${id}`} |
| 210 | + > |
| 211 | + {name as string} |
| 212 | + </Link> |
| 213 | + </h6> |
207 | 214 | <div className={styles.scoreCircle}>{score as number}</div> |
208 | 215 | </div> |
209 | 216 | <p className="text-white-50 small mb-3">{summary as string}</p> |
|
0 commit comments