Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 00a56b5

Browse files
committed
feat: filter deleted topic
1 parent 2b7e443 commit 00a56b5

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

‎src/page/topic/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ const TopicList: React.FC<Props> = (props) => {
171171
<ProList
172172
rowKey="id"
173173
showActions="always"
174-
dataSource={data}
174+
dataSource={data.filter((item: any)=>item?.author?.loginname)}
175175
loading={loading}
176176
metas={metas}
177177
className={styles.list}

‎src/service/topic.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ export const queryTopicList = async (params: {
1818
},
1919
};
2020

21-
const res = await request(`${BASE_URL}/api/v1/topics`, options);
22-
res.data = res.data.filter((item: any) => item?.author?.loginname);
23-
return res;
21+
return request(`${BASE_URL}/api/v1/topics`, options);
2422
};
2523

2624
export const queryTopicDetail = async (params: {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /