Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

task/COR-1349-Show sanity debugging tool on staging #4597

Merged
merged 1 commit into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ ARG ARG_NEXT_PUBLIC_COMMIT_ID
ARG ARG_NEXT_PUBLIC_PHASE="production"
ARG ARG_NEXT_PUBLIC_HOT_RELOAD_LOKALIZE=0
ARG ARG_API_URL
ARG ARG_NEXT_HOST_URL_STG

ENV NEXT_PUBLIC_SANITY_DATASET=$ARG_NEXT_PUBLIC_SANITY_DATASET
ENV NEXT_PUBLIC_SANITY_PROJECT_ID=$ARG_NEXT_PUBLIC_SANITY_PROJECT_ID
ENV NEXT_PUBLIC_COMMIT_ID=$ARG_NEXT_PUBLIC_COMMIT_ID
ENV NEXT_PUBLIC_PHASE=$ARG_NEXT_PUBLIC_PHASE
ENV NEXT_PUBLIC_HOT_RELOAD_LOKALIZE=ARG_NEXT_PUBLIC_HOT_RELOAD_LOKALIZE
ENV API_URL=$ARG_API_URL
ENV NEXT_HOST_URL_STG=$ARG_NEXT_HOST_URL_STG

# Layer that always gets executed
FROM builder
Expand Down
3 changes: 2 additions & 1 deletion packages/app/.env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ DISABLE_SITEMAP=true

NEXT_PUBLIC_SANITY_DATASET=development
NEXT_PUBLIC_SANITY_PROJECT_ID=5mog5ask
NEXT_HOST_URL_STG=
SANITY_API_TOKEN=
SANITY_PREVIEW_SECRET=

# set content of version string
NEXT_PUBLIC_COMMIT_ID=n/a
NEXT_PUBLIC_COMMIT_ID=n/a
2 changes: 1 addition & 1 deletion packages/app/src/locale/use-lokalize-text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export type Dataset = typeof datasets[number];
const query = `*[_type == 'lokalizeText']`;
const enableHotReload = process.env.NEXT_PUBLIC_PHASE === 'develop';

export const IS_STAGING_ENV = typeof window !== 'undefined' && window.location.host === 'staging.coronadashboard.rijksoverheid.nl';
export const IS_STAGING_ENV = typeof window !== 'undefined' && window.location.host === process.env.NEXT_HOST_URL_STG;

/**
* This hook will return an object which contains all lokalize translations.
Expand Down