feat: add folders (#1711)

This commit is contained in:
Catalin Pit
2025-05-01 19:46:59 +03:00
committed by GitHub
parent 12ada567f5
commit 17370749b4
91 changed files with 10497 additions and 183 deletions

View File

@ -49,6 +49,10 @@ export async function loader({ params, request }: Route.LoaderArgs) {
throw redirect(documentRootPath);
}
if (document?.folderId) {
throw redirect(documentRootPath);
}
const documentVisibility = document?.visibility;
const currentTeamMemberRole = team?.currentTeamMember?.role;
const isRecipient = document?.recipients.find((recipient) => recipient.email === user.email);
@ -83,7 +87,10 @@ export async function loader({ params, request }: Route.LoaderArgs) {
});
return superLoaderJson({
document,
document: {
...document,
folder: null,
},
documentRootPath,
isDocumentEnterprise,
});