Keep /privacy off unless the runtime flag is on, and show that link in the footer story.
A build-time public env value was enough to publish the page, and the footer interaction story still looked for a link the component hides by default.
This commit is contained in:
1 parent
072e5362f5
commit
81ad287c24
5 files changed
+15
-10
No files matched your search
@@ -1,13 +1,11 @@
|
||||
/**
|
||||
* `/privacy` stays off in production until university counsel has read the
|
||||
* policy. Staging sets `ENABLE_PRIVACY_POLICY=true` (or the public alias).
|
||||
* `/privacy` stays off until university counsel has read the policy.
|
||||
* Only the runtime switch `ENABLE_PRIVACY_POLICY=true` turns it on.
|
||||
* A build-time `NEXT_PUBLIC_ENABLE_PRIVACY_POLICY` value does not.
|
||||
* Unset or any other value is off.
|
||||
*/
|
||||
export function isPrivacyPolicyEnabled(): boolean {
|
||||
return (
|
||||
process.env.ENABLE_PRIVACY_POLICY === "true" ||
|
||||
process.env.NEXT_PUBLIC_ENABLE_PRIVACY_POLICY === "true"
|
||||
);
|
||||
return process.env.ENABLE_PRIVACY_POLICY === "true";
|
||||
}
|
||||
|
||||
/** Absolute /privacy URL, or null while the flag is off. */
|
||||
|
||||
Reference in new issue
Block a user