fix: back from file viewer

This commit is contained in:
2024-03-17 21:38:07 +07:00
parent e93b33d3d8
commit d1ecd6d00b
3 changed files with 3 additions and 12 deletions
+1 -10
View File
@@ -108,16 +108,7 @@ const FilesPage = () => {
/>
</FileDrop>
<FileInlineViewer
file={viewFile}
onClose={() => {
if (router.canGoBack()) {
router.back();
} else {
router.replace("/apps/files");
}
}}
/>
<FileInlineViewer file={viewFile} onClose={() => setViewFile(null)} />
</FilesContext.Provider>
);
};