Skip to content

Commit

Permalink
Merge pull request #99 from NiftyLeague/staging
Browse files Browse the repository at this point in the history
Update to NEXT_PUBLIC_VERCEL_ENV
  • Loading branch information
NiftyAndy authored Oct 1, 2024
2 parents d406408 + 6682281 commit 45a8fc1
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion apps/app/sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as Sentry from '@sentry/nextjs';

Sentry.init({
dsn: 'https://[email protected]/6689430',
enabled: process.env.VERCEL_ENV === 'production',
enabled: process.env.NEXT_PUBLIC_VERCEL_ENV === 'production',

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
Expand Down
2 changes: 1 addition & 1 deletion apps/app/sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Sentry.init({
debug: false,

// Uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: process.env.VERCEL_ENV === 'production',
// spotlight: process.env.NEXT_PUBLIC_VERCEL_ENV === 'production',
});
2 changes: 1 addition & 1 deletion apps/app/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const SUBGRAPH_URI = `https://gateway-arbitrum.network.thegraph.com/api/$

export const SUBGRAPH_DEV_URI = 'https://api.studio.thegraph.com/query/7093/nifty-league-sepolia/version/latest';

export const DEBUG = process.env.VERCEL_ENV !== 'production' || process.env.NEXT_PUBLIC_DEBUG === 'true';
export const DEBUG = process.env.NEXT_PUBLIC_VERCEL_ENV !== 'production' || process.env.NEXT_PUBLIC_DEBUG === 'true';

// Request polling intervals

Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/contexts/IMXContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface Context {

const CONTEXT_INITIAL_STATE: Context = {
address: undefined,
imxChainId: process.env.VERCEL_ENV === 'production' ? immutableZkEvm.id : immutableZkEvmTestnet.id,
imxChainId: process.env.NEXT_PUBLIC_VERCEL_ENV === 'production' ? immutableZkEvm.id : immutableZkEvmTestnet.id,
imxContracts: {} as Contracts,
imxSigner: undefined,
passportProvider: undefined,
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/utils/google-analytics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ReactGA from 'react-ga4';

const initGA = () => {
const isDev = !process.env.VERCEL_ENV || process.env.VERCEL_ENV !== 'production';
const isDev = !process.env.NEXT_PUBLIC_VERCEL_ENV || process.env.NEXT_PUBLIC_VERCEL_ENV !== 'production';
if (isDev) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/smashers/sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as Sentry from '@sentry/nextjs';

Sentry.init({
dsn: 'https://[email protected]/4506384689659904',
enabled: process.env.VERCEL_ENV === 'production',
enabled: process.env.NEXT_PUBLIC_VERCEL_ENV === 'production',

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
Expand Down
2 changes: 1 addition & 1 deletion apps/smashers/sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Sentry.init({
debug: false,

// Uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: process.env.VERCEL_ENV === 'production',
// spotlight: process.env.NEXT_PUBLIC_VERCEL_ENV === 'production',
});
2 changes: 1 addition & 1 deletion apps/smashers/src/hooks/useUnityEventHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const useUnityEventHandlers = ({ address, authToken, addEventListener, removeEve
);

const getConfiguration = useCallback((e: CustomEvent<{ callback: (network: string) => void }>) => {
const networkName = process.env.VERCEL_ENV === 'production' ? 'mainnet' : 'sepolia';
const networkName = process.env.NEXT_PUBLIC_VERCEL_ENV === 'production' ? 'mainnet' : 'sepolia';
const version = process.env.NEXT_PUBLIC_SUBGRAPH_VERSION;
// eslint-disable-next-line no-console
console.log('getConfiguration', `${networkName},${version ?? ''}`);
Expand Down
2 changes: 1 addition & 1 deletion apps/smashers/src/hooks/useVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ enum OS {

const useVersion = () => {
const [version, setVersion] = useState<string | null>(null);
const env = process.env.VERCEL_ENV === 'production' ? 'prod' : 'stage';
const env = process.env.NEXT_PUBLIC_VERCEL_ENV === 'production' ? 'prod' : 'stage';
const isLinux = typeof window !== 'undefined' && window?.navigator?.userAgent?.indexOf('Linux') >= 0;
let os = '';
let message = '';
Expand Down
2 changes: 1 addition & 1 deletion apps/smashers/src/utils/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const sessionOptions: IronSessionOptions = {
cookieName: 'iron-session/playfab',
// secure: true should be used in production (HTTPS) but can't be used in development (HTTP)
cookieOptions: {
secure: process.env.VERCEL_ENV === 'production' || process.env.VERCEL_ENV === 'preview',
secure: process.env.NEXT_PUBLIC_VERCEL_ENV === 'production' || process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview',
},
};

Expand Down
4 changes: 2 additions & 2 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const nextConfig = {
source: '/account/login',
destination: 'https://shop.niftyleague.com/account/login',
},
...(process.env.VERCEL_ENV === 'production' || process.env.VERCEL_ENV === 'preview'
...(process.env.NEXT_PUBLIC_VERCEL_ENV === 'production' || process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview'
? [
{
source: '/docs/:path*',
Expand All @@ -69,7 +69,7 @@ const nextConfig = {
},
async redirects() {
return [
...(!process.env.VERCEL_ENV || process.env.VERCEL_ENV === 'development'
...(!process.env.NEXT_PUBLIC_VERCEL_ENV || process.env.NEXT_PUBLIC_VERCEL_ENV === 'development'
? [
{
source: '/docs/:path*',
Expand Down
2 changes: 1 addition & 1 deletion apps/web/sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as Sentry from '@sentry/nextjs';

Sentry.init({
dsn: 'https://[email protected]/4504089815351296',
enabled: process.env.VERCEL_ENV === 'production',
enabled: process.env.NEXT_PUBLIC_VERCEL_ENV === 'production',

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Sentry.init({
debug: false,

// Uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: process.env.VERCEL_ENV === 'production',
// spotlight: process.env.NEXT_PUBLIC_VERCEL_ENV === 'production',
});
2 changes: 1 addition & 1 deletion packages/imx-passport/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const env = {

const baseURL = typeof window !== 'undefined' && window?.location?.origin;
const environment =
process.env.VERCEL_ENV === 'production' ? config.Environment.PRODUCTION : config.Environment.SANDBOX;
process.env.NEXT_PUBLIC_VERCEL_ENV === 'production' ? config.Environment.PRODUCTION : config.Environment.SANDBOX;

const passportConfig: PassportModuleConfiguration = {
baseConfig: {
Expand Down

0 comments on commit 45a8fc1

Please sign in to comment.