chore: update MemoRelationListView.tsx (#1933)

This commit is contained in:
Sergei Vassiljev 2023-07-13 14:42:50 +03:00 committed by GitHub
parent 3093f80d68
commit 934f57c92f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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]);