🧹
This commit is contained in:
parent
14395bdbdd
commit
f338e14577
|
@ -5,6 +5,8 @@ import { BrowserRouter, Switch, Route } from 'react-router-dom'
|
||||||
import { Dashboard } from './pages/Dashboard'
|
import { Dashboard } from './pages/Dashboard'
|
||||||
import { Session } from './pages/Session'
|
import { Session } from './pages/Session'
|
||||||
|
|
||||||
|
console.log('ENV', process.env.NODE_ENV)
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
return (
|
return (
|
||||||
<BrowserRouter>
|
<BrowserRouter>
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import { Client } from '../types'
|
import { Client } from '../types'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import settings from '../settings'
|
|
||||||
|
|
||||||
if (settings.env === 'jank') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
const host = 'http://192.168.1.107:5000'
|
const host = 'http://192.168.1.107:5000'
|
||||||
axios.defaults.baseURL = host
|
axios.defaults.baseURL = host
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { Button, Card, message, Modal, PageHeader, Spin } from 'antd'
|
import { Card, message, Modal, PageHeader, Spin } from 'antd'
|
||||||
import { getSession } from '../api'
|
import { getSession } from '../api'
|
||||||
import settings from '../settings'
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
clientId: string
|
clientId: string
|
||||||
|
@ -36,7 +35,8 @@ export const SessionPictures = ({ clientId }: Props) => {
|
||||||
|
|
||||||
const closeModal = () => setActiveUrl(null)
|
const closeModal = () => setActiveUrl(null)
|
||||||
|
|
||||||
const host = settings.env === 'jank' ? 'http://192.168.1.107:5000' : ''
|
const host =
|
||||||
|
process.env.NODE_ENV === 'development' ? 'http://192.168.1.107:5000' : ''
|
||||||
|
|
||||||
if (!urls?.length) return null
|
if (!urls?.length) return null
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
export default {
|
|
||||||
env: 'prod',
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user