Skip to content

Commit

Permalink
isDev devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
ceddybi committed Jan 31, 2024
1 parent a923e36 commit d125552
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import _get from "lodash/get";
import axios from 'axios';
import { isEmpty } from "lodash";

const isDev = process.env.APP_DEV ? (process.env.APP_DEV.trim() == "true") : false;
export const isDev = process.env.APP_DEV ? (process.env.APP_DEV.trim() == "true") : false;

export const baseURL = isDev ? "http://localhost:3001" : "https://aij.vercel.app";
const api = axios.create({
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { APPEVENTS, AppEvents } from './events';
import { AppJob, BEState, addApplied, getAllQuestion, getResume, getState, readQuestion, saveQuestion, saveResume, setState } from "./utils/state";
import { BrowserWindow, app, dialog, ipcMain, session, shell } from 'electron';
import { baseURL, getAuthApi } from './api';
import { baseURL, getAuthApi, isDev } from './api';
import { gotoAppPage, gotoMainPage } from './config/app';

import packageJson from '../package.json';
Expand Down Expand Up @@ -111,7 +111,7 @@ const createWindow = (): void => {
mainWindow.loadURL(MAIN_WINDOW_WEBPACK_ENTRY);

// Open the DevTools.
mainWindow.webContents.openDevTools();
if (isDev) mainWindow.webContents.openDevTools();
};

// This method will be called when Electron has finished
Expand Down

0 comments on commit d125552

Please sign in to comment.