fix: pdf viewer and embeds

This commit is contained in:
David Nguyen
2025-02-20 15:06:36 +11:00
parent 250381fec8
commit 50a41d0799
20 changed files with 572 additions and 665 deletions

View File

@ -1,7 +1,7 @@
import { data } from 'react-router';
import { match } from 'ts-pattern';
import { getSession } from '@documenso/auth/server/lib/utils/get-session';
import { getOptionalSession } from '@documenso/auth/server/lib/utils/get-session';
import { isUserEnterprise } from '@documenso/ee/server-only/util/is-document-enterprise';
import { isDocumentPlatform } from '@documenso/ee/server-only/util/is-document-platform';
import { IS_BILLING_ENABLED } from '@documenso/lib/constants/app';
@ -49,7 +49,7 @@ export async function loader({ params, request }: Route.LoaderArgs) {
);
}
const { user } = await getSession(request);
const { user } = await getOptionalSession(request);
const { derivedRecipientAccessAuth } = extractDocumentAuthMethods({
documentAuth: template.authOptions,