Skip to content

Commit

Permalink
add logs for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
RyKilleen committed Jul 24, 2022
1 parent 7d6553a commit 5c6e99d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/app/services/cms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ export const getClient = (usePreview = false) =>

export const isPreviewEnabled = (request: Request) => {
const requestUrl = new URL(request?.url);
console.log("checking preview secret", SANITY_PREVIEW_SECRET);
const preview =
requestUrl?.searchParams?.get("preview") === SANITY_PREVIEW_SECRET;

console.log("preview enabled:", preview);
return preview;
};

Expand Down

0 comments on commit 5c6e99d

Please sign in to comment.