Skip to content

Commit

Permalink
Adding dev
Browse files Browse the repository at this point in the history
  • Loading branch information
phutelmyer committed Aug 25, 2023
1 parent dfaba48 commit d7b5518
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "ui",
"version": "0.1.0",
"private": true,
"homepage": ".",
"dependencies": {
"@ant-design/pro-form": "^1.69.4",
"@ant-design/pro-layout": "^6.38.9",
Expand Down
3 changes: 3 additions & 0 deletions ui/public/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
window.appConfig = {
baseUrl: '/strelkaui' // Default to strelkaui for now. This can be changed to '/whatever' or any other base path as needed.
};
1 change: 1 addition & 0 deletions ui/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<script src="%PUBLIC_URL%/config.js"></script>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
20 changes: 11 additions & 9 deletions ui/src/App.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
import React, { Component } from 'react';
import './App.css';
import React, { Component } from "react";
import "./App.css";

import { BrowserRouter } from 'react-router-dom'
import MainRouter from './routes/MainRouter'
import AuthenticationProvider from './providers/AuthProvider';
import { BrowserRouter } from "react-router-dom";
import MainRouter from "./routes/MainRouter";
import AuthenticationProvider from "./providers/AuthProvider";

class App extends Component {
const baseUrl = window.appConfig ? window.appConfig.baseUrl : "/";

class App extends Component {
render() {
return (
<div className="App">
<AuthenticationProvider>
<BrowserRouter>
<MainRouter/>
<BrowserRouter basename={baseUrl}>
<MainRouter />
</BrowserRouter>
</AuthenticationProvider>
</div>
);
}
}

export default App;
export default App;

0 comments on commit d7b5518

Please sign in to comment.