diff --git a/src/routes/dashboard/[workspace_id].tsx b/src/routes/dashboard/[workspace_id].tsx index 94ca3cf..a636e02 100644 --- a/src/routes/dashboard/[workspace_id].tsx +++ b/src/routes/dashboard/[workspace_id].tsx @@ -110,50 +110,52 @@ const Page: Component = () => { window.scrollTo(0, 0); }); - const [openDeleteModal] = createModal(({ Description, CloseButton, data: file }) => ( - <> -
-

- Delete file -

- - - -
- - Are you sure you want to - permanently delete this file? You - won't be able to restore this from - the trash bin later on. - -
{ - event.preventDefault(); - await removePermanentlyFile(file!.id); + const [openDeleteModal] = createModal( + ({ Description, CloseButton, data: file }) => ( + <> +
+

Delete file

+ + + +
+ + Are you sure you want to permanently delete this file? You won't be + able to restore this from the trash bin later on. + + { + event.preventDefault(); + await removePermanentlyFile(file!.id); - setWorkspaceContent((prev) => prev - ? prev.filter(item => - item.type === "workspace" || - (item.type === "file" && item.data.id !== file!.id) - ) - : [] - ); - }} - > - - Yes - - + prev + ? prev.filter( + (item) => + item.type === "workspace" || + (item.type === "file" && item.data.id !== file!.id) + ) + : [] + ); + }} > - No - - - - )) + + Yes + + + No + + + + ) + ); return ( <> @@ -356,7 +358,7 @@ const Page: Component = () => { {(file) => ( -
+
{getFileIcon(file())} @@ -407,7 +409,8 @@ const Page: Component = () => { Favorite - openDeleteModal(file())} > @@ -425,7 +428,7 @@ const Page: Component = () => { > {(workspace) => (