diff --git a/apps/roboshield/.env b/apps/roboshield/.env index bd685430f..70e4388ba 100644 --- a/apps/roboshield/.env +++ b/apps/roboshield/.env @@ -9,3 +9,5 @@ SENTRY_PROJECT=roboshield NEXT_PUBLIC_IMAGE_DOMAINS="*.codeforafrica.org" NEXT_PUBLIC_IMAGE_UNOPTIMIZED="true" + +NEXT_PUBLIC_APP_URL=http://localhost:3000 diff --git a/apps/roboshield/src/payload/utils/formatDraftUrl.ts b/apps/roboshield/src/payload/utils/formatDraftUrl.ts index dbfe69ecf..714a7e111 100644 --- a/apps/roboshield/src/payload/utils/formatDraftUrl.ts +++ b/apps/roboshield/src/payload/utils/formatDraftUrl.ts @@ -3,6 +3,7 @@ import { Document } from "payload/types"; const payloadUrl = process.env.PAYLOAD_PUBLIC_APP_URL || process.env.NEXT_PUBLIC_APP_URL; + function formatDraftUrl(collection: string, doc: Document) { const pagePath = formatPagePath(collection, doc); if (pagePath) {