1- import React from 'react'
2- import {
3- HashRouter ,
4- Routes ,
5- Route ,
6- } from "react-router-dom" ;
7- import { ToastContainer } from 'react-toastify' ;
1+ import React from "react" ;
2+ import { HashRouter , Route , Routes } from "react-router-dom" ;
3+ import { ToastContainer } from "react-toastify" ;
84
9- import { ROUTES } from './constants/routes' ;
10- import { WorkbenchDBProvider } from './contexts/workbenchContext' ;
5+ import DropZone from "./components/DropZone/DropZone" ;
6+ import Layout from "./components/Layout/Layout" ;
7+ import { ROUTES } from "./constants/routes" ;
8+ import { WorkbenchDBProvider } from "./contexts/dbContext" ;
9+ import { WorkbenchStateProvider } from "./contexts/stateContext" ;
10+ import About from "./pages/About/About" ;
11+ import ChartView from "./pages/ChartView/ChartView" ;
12+ import FileInfoDash from "./pages/FileInfoDash/FileInfoDash" ;
13+ import Home from "./pages/Home/Home" ;
14+ import Licenses from "./pages/Licenses/Licenses" ;
15+ import LicenseInfoDash from "./pages/LicenseInfoDash/LicenseInfoDash" ;
16+ import PackageInfoDash from "./pages/PackageInfoDash/PackageInfoDash" ;
17+ import Packages from "./pages/Packages/Packages" ;
18+ import PageNotFound from "./pages/PageNotFound" ;
19+ import ScanInfo from "./pages/ScanInfo/ScanInfo" ;
20+ import TableView from "./pages/TableView/TableView" ;
1121
12- import Layout from './components/Layout/Layout' ;
13- import DropZone from './components/DropZone/DropZone' ;
22+ import "./utils/ensureRendererDeps" ;
23+ import "./fontawesome" ;
1424
15- import Home from './pages/Home/Home'
16- import TableView from './pages/TableView/TableView' ;
17- import FileInfoDash from './pages/FileInfoDash/FileInfoDash' ;
18- import LicenseInfoDash from './pages/LicenseInfoDash/LicenseInfoDash' ;
19- import PackageInfoDash from './pages/PackageInfoDash/PackageInfoDash' ;
20- import Packages from './pages/Packages/Packages' ;
21- import LicenseDetections from './pages/LicenseDetections/LicenseDetections' ;
22- import ChartView from './pages/ChartView/ChartView' ;
23- import ScanInfo from './pages/ScanInfo/ScanInfo' ;
24- import About from './pages/About/About' ;
25- import PageNotFound from './pages/PageNotFound' ;
26-
27- import './utils/ensureRendererDeps' ;
28-
29- import './fontawesome' ;
30- import 'rc-tree/assets/index.css' ;
31- import 'react-toastify/dist/ReactToastify.css' ;
32- import 'bootstrap/dist/css/bootstrap.min.css' ;
33- import 'react-tooltip/dist/react-tooltip.css'
34-
35- import './app.css' ;
36- import './dashStyles.css' ;
37- import './customFaColors.css' ;
25+ import "rc-tree/assets/index.css" ;
26+ import "react-toastify/dist/ReactToastify.css" ;
27+ import "bootstrap/dist/css/bootstrap.min.css" ;
28+ import "react-tooltip/dist/react-tooltip.css" ;
29+ import "./app.css" ;
30+ import "./dashStyles.css" ;
31+ import "./customFaColors.css" ;
3832
3933const App = ( ) => {
4034 return (
41- < HashRouter >
42- < WorkbenchDBProvider >
43- < DropZone >
44- < Layout >
45- < Routes >
46- < Route path = { ROUTES . HOME } >
47- < Route index element = { < Home /> } />
48- < Route path = { ROUTES . ABOUT } element = { < About /> } />
49- < Route path = { ROUTES . TABLE_VIEW } element = { < TableView /> } />
50- < Route path = { ROUTES . FILE_DASHBOARD } element = { < FileInfoDash /> } />
51- < Route path = { ROUTES . LICENSE_DASHBOARD } element = { < LicenseInfoDash /> } />
52- < Route path = { ROUTES . PACKAGE_DASHBOARD } element = { < PackageInfoDash /> } />
53- < Route path = { ROUTES . LICENSE_DETECTIONS } element = { < LicenseDetections /> } />
54- < Route path = { ROUTES . PACKAGES } element = { < Packages /> } />
55- < Route path = { ROUTES . CHART_SUMMARY } element = { < ChartView /> } />
56- < Route path = { ROUTES . SCAN_INFO } element = { < ScanInfo /> } />
57- </ Route >
58- < Route path = "*" element = { < PageNotFound /> } />
59- </ Routes >
60- </ Layout >
35+ < HashRouter basename = "/" >
36+ < WorkbenchStateProvider >
37+ < WorkbenchDBProvider >
38+ < DropZone >
39+ < Layout >
40+ < Routes >
41+ < Route path = { ROUTES . HOME } >
42+ < Route index element = { < Home /> } />
43+ < Route path = { ROUTES . ABOUT } element = { < About /> } />
44+ < Route path = { ROUTES . TABLE_VIEW } element = { < TableView /> } />
45+ < Route
46+ path = { ROUTES . FILE_DASHBOARD }
47+ element = { < FileInfoDash /> }
48+ />
49+ < Route
50+ path = { ROUTES . LICENSE_DASHBOARD }
51+ element = { < LicenseInfoDash /> }
52+ />
53+ < Route
54+ path = { ROUTES . PACKAGE_DASHBOARD }
55+ element = { < PackageInfoDash /> }
56+ />
57+ < Route
58+ path = { ROUTES . LICENSES }
59+ element = { < Licenses /> }
60+ />
61+ < Route path = { ROUTES . PACKAGES } element = { < Packages /> } />
62+ < Route path = { ROUTES . CHART_SUMMARY } element = { < ChartView /> } />
63+ < Route path = { ROUTES . SCAN_INFO } element = { < ScanInfo /> } />
64+ </ Route >
65+ < Route path = "*" element = { < PageNotFound /> } />
66+ </ Routes >
67+ </ Layout >
6168
62- { /* Provider for toasts */ }
63- < ToastContainer
64- limit = { 1 }
65- draggable
66- closeOnClick
67- hideProgressBar = { false }
68- autoClose = { 2000 }
69- position = 'bottom-center'
70- />
71- </ DropZone >
72- </ WorkbenchDBProvider >
69+ { /* Provider for toasts */ }
70+ < ToastContainer
71+ limit = { 1 }
72+ draggable
73+ closeOnClick
74+ hideProgressBar = { false }
75+ autoClose = { 2000 }
76+ position = "bottom-center"
77+ />
78+ </ DropZone >
79+ </ WorkbenchDBProvider >
80+ </ WorkbenchStateProvider >
7381 </ HashRouter >
74- )
75- }
82+ ) ;
83+ } ;
7684
77- export default App
85+ export default App ;
0 commit comments