Skip to content

Commit

Permalink
Merge pull request #459 from mwskwong/main
Browse files Browse the repository at this point in the history
Merge back to canary
  • Loading branch information
mwskwong committed Aug 27, 2024
2 parents 5df5514 + 6f26241 commit 865fc25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/constants/site-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { capitalize } from 'lodash-es';

export const siteUrl = (() => {
const localUrl = `http://localhost:${process.env.PORT ?? 3000}`;
if (!process.env.VERCEL) return localUrl;
if (!process.env.NEXT_PUBLIC_VERCEL_ENV) return localUrl;

const previewDeploymentHostname =
process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ??
Expand Down
3 changes: 1 addition & 2 deletions src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const VercelUrlSchema = pipe(string(), nonEmpty());

const EnvSchema = object({
DATABASE_URL: pipe(string(), url()),
VERCEL: optional(literal('1')),
VERCEL_ENV: VercelEnvSchema,
CONTENTFUL_ENVIRONMENT: (() => {
switch (process.env.VERCEL_ENV) {
Expand Down Expand Up @@ -61,7 +60,7 @@ if (process.env.npm_lifecycle_event !== 'lint') {
}

declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace -- this is a valid namespace form @types/node
// eslint-disable-next-line @typescript-eslint/no-namespace -- this is a valid namespace from @types/node
namespace NodeJS {
// eslint-disable-next-line @typescript-eslint/no-empty-interface -- ProcessEnv is an interface, extending it here
interface ProcessEnv extends InferOutput<typeof EnvSchema> {}
Expand Down

0 comments on commit 865fc25

Please sign in to comment.