Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
maltheism committed Jun 11, 2022
1 parent d16ad8e commit 6c9c926
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 132 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"plugins": [
"react"
],
Expand Down
48 changes: 23 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,38 @@
"description": "EEG/iEEG to BIDS format Wizard",
"version": "1.0.5",
"dependencies": {
"@electron/remote": "^1.1.0",
"@fortawesome/fontawesome-free": "^5.15.4",
"electron-log": "^4.3.5",
"electron-store": "^8.0.0",
"keytar": "^7.7.0",
"papaparse": "^5.3.1",
"prop-types": "^15.7.2",
"react": "^17.0.2",
"@electron/remote": "^2.0.8",
"@fortawesome/fontawesome-free": "^6.1.1",
"electron-log": "^4.4.6",
"electron-store": "^8.0.1",
"keytar": "^7.9.0",
"papaparse": "^5.3.2",
"prop-types": "^15.8.1",
"react": "^18.0.0",
"react-color": "^2.19.3",
"react-datepicker": "^4.1.1",
"react-dom": "^17.0.2",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.2",
"react-switch": "^6.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.3.0",
"react-scripts": "^5.0.0",
"react-tooltip": "^4.2.21",
"socket.io-client": "^4.1.2"
"socket.io-client": "^4.4.1"
},
"devDependencies": {
"@babel/core": "^7.14.3",
"@babel/eslint-parser": "^7.14.4",
"concurrently": "^6.2.0",
"@babel/core": "^7.17.9",
"@babel/eslint-parser": "^7.17.0",
"concurrently": "^7.1.0",
"cross-env": "^7.0.3",
"electron": "^13.0.1",
"electron-builder": "^22.11.4",
"electron": "^18.0.3",
"electron-builder": "^23.0.3",
"electron-devtools-installer": "^3.2.0",
"eslint": "^7.27.0",
"eslint": "^8.13.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx": "^0.1.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.24.0",
"lint-staged": "^11.0.0",
"wait-on": "^6.0.0"
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.29.4",
"lint-staged": "^12.3.7",
"wait-on": "^6.0.1"
},
"scripts": {
"rebuild": "rebuild --runtime=electron --target=11.2.1",
Expand Down
4 changes: 2 additions & 2 deletions public/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ let mainWindow;
*/
const createMainWindow = () => {
const startUrl = process.env.DEV ?
'http://localhost:3000?app' :
'http://localhost:3000/app' :
`${url.pathToFileURL(path.join(
__dirname, '/../build/index.html')).href}?app`;
__dirname, '/../build/index.html')).href}/app`;
mainWindow = new BrowserWindow({
show: false,
icon,
Expand Down
20 changes: 14 additions & 6 deletions src/ViewManager.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import React from 'react';
import {BrowserRouter as Router, Route} from 'react-router-dom';
import {
BrowserRouter,
Routes,
Route,
} from 'react-router-dom';

// Components
import App from './App';
Expand All @@ -16,17 +20,21 @@ const ViewManager = (props) => {
* @return {JSX.Element} - React markup for component.
*/
return (
<Router>
<BrowserRouter>
<div>
<Route path='/' component={ViewManager.View}/>
<Routes>
{/*<Route path='/' element={ViewManager.View}/>*/}
<Route path='/app' exact element={<App/>}/>
<Route path='/settings' element={<Settings/>}/>
</Routes>
</div>
</Router>
</BrowserRouter>
);
};
ViewManager.views = () => {
return {
app: <App/>,
settings: <Settings/>,
app: <App />,
settings: <Settings />,
};
};
ViewManager.View = (props) => {
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import ReactDOM from 'react-dom';
import {createRoot} from 'react-dom/client';
import './css/index.css';
import App from './App';
import ViewManager from './ViewManager';
import * as serviceWorker from './serviceWorker';

ReactDOM.render(<ViewManager/>, document.getElementById('root'));
const root = createRoot(document.getElementById('root'));
root.render(<ViewManager/>);

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
Expand Down
Loading

0 comments on commit 6c9c926

Please sign in to comment.