Skip to content

Commit 8ed3e06

Browse files
committed
refactor: use shared hackathon user helper
1 parent 8c12e16 commit 8ed3e06

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

components/Activity/Hackathon/constant.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { TableCellUser } from 'mobx-lark';
2-
31
import { Activity, ActivityModel } from '../../../models/Activity';
42
import { Agenda, Organization, Person, Prize, Project, Template } from '../../../models/Hackathon';
53
import { i18n } from '../../../models/Translation';
@@ -13,6 +11,7 @@ import {
1311
formatPeriod,
1412
normalizeAgendaType,
1513
previewText,
14+
userOf,
1615
} from './utility';
1716

1817
export const RequiredTableKeys = [
@@ -336,7 +335,7 @@ export const buildProjectItems = (
336335
{ projects, activity }: { projects: Project[]; activity: Activity },
337336
) =>
338337
projects.map(({ id, name, score, summary, createdBy, members }) => {
339-
const creator = createdBy as TableCellUser | undefined;
338+
const creator = userOf(createdBy);
340339
const scoreText = score === null || score === undefined || score === '' ? '—' : `${score}`;
341340

342341
return {

0 commit comments

Comments
 (0)