From 1d2ca485cc1463ced6dacd43d73441e98c1b2d37 Mon Sep 17 00:00:00 2001 From: hieutmd Date: Mon, 15 May 2023 10:39:43 +0700 Subject: [PATCH] ok --- src/config.ts | 4 +--- src/index.tsx | 11 +++++++---- src/setupProxy.js | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/config.ts b/src/config.ts index 8d917c0..c9f0b9d 100644 --- a/src/config.ts +++ b/src/config.ts @@ -17,8 +17,6 @@ export const getConnectNode = (node_id: string) => { return `https://${node_id}.chatngay.com:8080/chat` }; -export const SOCKET_OPTIONS = { - -} +export const SOCKET_OPTIONS = {} export const CREDENTIAL_SAVE_KEY = 'chatngay-u'; diff --git a/src/index.tsx b/src/index.tsx index e2ee1a1..81f586d 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -4,12 +4,13 @@ import { Provider} from 'react-redux'; import App from './App'; import reportWebVitals from './reportWebVitals'; import store from "./store"; -import {runTest} from "./test"; +//import {runTest} from "./test"; // local import {getSettings, setUp} from "@/setup"; import Error from '@/components/Error'; import {isBrowserSupport} from "@/lib/utils"; +import {ClientSettings} from "@/typings"; // style //import './index.css'; @@ -26,11 +27,13 @@ import {isBrowserSupport} from "@/lib/utils"; return; } - const client_setting = await getSettings(); + /*const client_setting = await getSettings(); if (! client_setting ) { ReactDOM.render(, render_root); return; - } + }*/ + + const client_setting: ClientSettings = {staff: []} await setUp(); @@ -42,7 +45,7 @@ import {isBrowserSupport} from "@/lib/utils"; ReactDOM.render(, render_root); - runTest(); + //runTest(); })(); diff --git a/src/setupProxy.js b/src/setupProxy.js index f2e95d3..679635b 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -5,8 +5,8 @@ const createProxyMiddleware = require('http-proxy-middleware'); // proxy middleware options // see: https://www.npmjs.com/package/http-proxy-middleware#http-proxy-options const options = { - // target: 'https://api195.chatngay.com/admin/', // target host - target: 'http://local.chatngay.api/admin/', //https://api195.chatngay.com/admin/', // target host + target: 'https://api2.chatngay.com/admin/', // target host + //target: 'http://local.chatngay.api/admin/', //https://api2.chatngay.com/admin/', // target host changeOrigin: true, // needed for virtual hosted sites //ws: true, // proxy websockets pathRewrite: {