Skip to content

Commit 77fa3bb

Browse files
committed
update fields
1 parent 42e41dd commit 77fa3bb

File tree

1 file changed

+12
-16
lines changed
  • frontend/src/app/my/mentorship/programs/[programKey]/modules/[moduleKey]/issues

1 file changed

+12
-16
lines changed

frontend/src/app/my/mentorship/programs/[programKey]/modules/[moduleKey]/issues/page.tsx

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { useParams, useRouter, useSearchParams } from 'next/navigation'
88
import { useEffect, useMemo, useState } from 'react'
99
import { ErrorDisplay, handleAppError } from 'app/global-error'
1010
import { GET_MODULE_ISSUES } from 'server/queries/moduleQueries'
11-
import type { Issue } from 'types/issue'
1211
import LoadingSpinner from 'components/LoadingSpinner'
1312
import Pagination from 'components/Pagination'
1413

@@ -40,24 +39,21 @@ const IssuesPage = () => {
4039
}, [error])
4140

4241
const moduleData = data?.getModule
43-
const moduleIssues: Issue[] = useMemo(() => {
44-
return (moduleData?.issues || []).map((i) => ({
45-
author: i.author,
46-
createdAt: i.createdAt,
47-
hint: '',
48-
labels: i.labels || [],
42+
type ModuleIssueRow = {
43+
objectID: string
44+
number: number
45+
title: string
46+
state: string
47+
labels: string[]
48+
}
49+
50+
const moduleIssues: ModuleIssueRow[] = useMemo(() => {
51+
return (moduleData?.issues || []).map((i: any) => ({
52+
objectID: i.id,
4953
number: i.number,
50-
organizationName: i.organizationName,
51-
projectName: moduleData?.projectName || '',
52-
projectUrl: '',
53-
repository: undefined,
54-
repositoryLanguages: [],
55-
body: i.body || '',
5654
title: i.title,
5755
state: i.state,
58-
updatedAt: i.createdAt,
59-
url: i.url,
60-
objectID: i.id,
56+
labels: i.labels || [],
6157
}))
6258
}, [moduleData])
6359

0 commit comments

Comments
 (0)