Skip to content

Commit

Permalink
feat: move env to config
Browse files Browse the repository at this point in the history
  • Loading branch information
walt-it committed Oct 6, 2024
1 parent f6b687c commit 7d45f98
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/env.ts → src/config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ function checkEnv() {
}

export const env = checkEnv();

export const isLocal = env.VITE_APP_ENV === "local";
5 changes: 1 addition & 4 deletions src/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import { env } from "~/env";

export const isLocal = env.VITE_APP_ENV === "local";

export * from "./common";
export * from "./env";
export * from "./storybook";
2 changes: 1 addition & 1 deletion src/services/api/axios.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from "axios";

import { env } from "~/env";
import { env } from "~/config";
import {
authHeaderInterceptor,
errorResponseInterceptor,
Expand Down
3 changes: 1 addition & 2 deletions src/services/sentry/SentryInit.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as Sentry from "@sentry/react";

import { isLocal } from "~/config";
import { env } from "~/env";
import { env, isLocal } from "~/config";

if (!isLocal) {
Sentry.init({
Expand Down

0 comments on commit 7d45f98

Please sign in to comment.