mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update MemoRelationListView.tsx (#1933)
This commit is contained in:
@ -13,10 +13,10 @@ const MemoRelationListView = (props: Props) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchRelatedMemoList = async () => {
|
const fetchRelatedMemoList = async () => {
|
||||||
const requests = relationList.map((relation) => memoCacheStore.getOrFetchMemoById(relation.relatedMemoId));
|
const memoList = await Promise.all(relationList.map((relation) => memoCacheStore.getOrFetchMemoById(relation.relatedMemoId)));
|
||||||
const memoList = await Promise.all(requests);
|
|
||||||
setRelatedMemoList(memoList);
|
setRelatedMemoList(memoList);
|
||||||
};
|
};
|
||||||
|
|
||||||
fetchRelatedMemoList();
|
fetchRelatedMemoList();
|
||||||
}, [relationList]);
|
}, [relationList]);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user