Merge branch 'dev' into fixes

This commit is contained in:
Isaac Wise
2024-08-18 13:21:02 -05:00
committed by GitHub
32 changed files with 956 additions and 302 deletions
@@ -91,14 +91,14 @@ export default function PreservedFormatsModal({ onClose, link }: Props) {
useEffect(() => {
(async () => {
await getLink.mutateAsync(link.id as number);
await getLink.mutateAsync({ id: link.id as number });
})();
let interval: NodeJS.Timeout | null = null;
if (!isReady()) {
interval = setInterval(async () => {
await getLink.mutateAsync(link.id as number);
await getLink.mutateAsync({ id: link.id as number });
}, 5000);
} else {
if (interval) {
@@ -124,7 +124,7 @@ export default function PreservedFormatsModal({ onClose, link }: Props) {
toast.dismiss(load);
if (response.ok) {
await getLink.mutateAsync(link?.id as number);
await getLink.mutateAsync({ id: link.id as number });
toast.success(t("link_being_archived"));
} else toast.error(data.response);