mirror of https://github.com/usememos/memos.git
chore: fix lint on attachments
This commit is contained in:
parent
c9d44c0526
commit
46111277ea
|
|
@ -6,9 +6,9 @@ import { useEffect, useState } from "react";
|
||||||
import AttachmentIcon from "@/components/AttachmentIcon";
|
import AttachmentIcon from "@/components/AttachmentIcon";
|
||||||
import Empty from "@/components/Empty";
|
import Empty from "@/components/Empty";
|
||||||
import MobileHeader from "@/components/MobileHeader";
|
import MobileHeader from "@/components/MobileHeader";
|
||||||
|
import { Button } from "@/components/ui/button";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import { Button } from "@/components/ui/button";
|
|
||||||
import { attachmentServiceClient } from "@/grpcweb";
|
import { attachmentServiceClient } from "@/grpcweb";
|
||||||
import useLoading from "@/hooks/useLoading";
|
import useLoading from "@/hooks/useLoading";
|
||||||
import useResponsiveWidth from "@/hooks/useResponsiveWidth";
|
import useResponsiveWidth from "@/hooks/useResponsiveWidth";
|
||||||
|
|
@ -80,9 +80,7 @@ const Attachments = observer(() => {
|
||||||
});
|
});
|
||||||
setAttachments((prevAttachments) => [...prevAttachments, ...fetchedAttachments]);
|
setAttachments((prevAttachments) => [...prevAttachments, ...fetchedAttachments]);
|
||||||
setNextPageToken(newPageToken ?? "");
|
setNextPageToken(newPageToken ?? "");
|
||||||
await Promise.all(
|
await Promise.all(fetchedAttachments.map((attachment) => (attachment.memo ? memoStore.getOrFetchMemoByName(attachment.memo) : null)));
|
||||||
fetchedAttachments.map((attachment) => (attachment.memo ? memoStore.getOrFetchMemoByName(attachment.memo) : null)),
|
|
||||||
);
|
|
||||||
} finally {
|
} finally {
|
||||||
setIsLoadingMore(false);
|
setIsLoadingMore(false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue