incoporate react-router-dom; start skeleton for registration/verification (#50)

This commit is contained in:
Michael Quigley 2022-09-19 15:02:42 -04:00
parent 4c8e4dbdef
commit 539ffe78b5
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
5 changed files with 83 additions and 3 deletions

59
ui/package-lock.json generated
View File

@ -19,6 +19,7 @@
"react-data-table-component": "^7.5.2",
"react-dom": "^18.2.0",
"react-flow-renderer": "^10.3.12",
"react-router-dom": "^6.4.0",
"react-scripts": "5.0.1",
"styled-components": "^5.3.5"
}
@ -3479,6 +3480,14 @@
"url": "https://opencollective.com/popperjs"
}
},
"node_modules/@remix-run/router": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.0.tgz",
"integrity": "sha512-SCR1cxRSMNKjaVYptCzBApPDqGwa3FGdjVHc+rOToocNPHQdIYLZBfv/3f+KvYuXDkUGVIW9IAzmPNZDRL1I4A==",
"engines": {
"node": ">=14"
}
},
"node_modules/@rollup/plugin-babel": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
@ -14291,6 +14300,35 @@
"node": ">=0.10.0"
}
},
"node_modules/react-router": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.0.tgz",
"integrity": "sha512-B+5bEXFlgR1XUdHYR6P94g299SjrfCBMmEDJNcFbpAyRH1j1748yt9NdDhW3++nw1lk3zQJ6aOO66zUx3KlTZg==",
"dependencies": {
"@remix-run/router": "1.0.0"
},
"engines": {
"node": ">=14"
},
"peerDependencies": {
"react": ">=16.8"
}
},
"node_modules/react-router-dom": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.0.tgz",
"integrity": "sha512-4Aw1xmXKeleYYQ3x0Lcl2undHR6yMjXZjd9DKZd53SGOYqirrUThyUb0wwAX5VZAyvSuzjNJmZlJ3rR9+/vzqg==",
"dependencies": {
"react-router": "6.4.0"
},
"engines": {
"node": ">=14"
},
"peerDependencies": {
"react": ">=16.8",
"react-dom": ">=16.8"
}
},
"node_modules/react-scripts": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz",
@ -19383,6 +19421,11 @@
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz",
"integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw=="
},
"@remix-run/router": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.0.tgz",
"integrity": "sha512-SCR1cxRSMNKjaVYptCzBApPDqGwa3FGdjVHc+rOToocNPHQdIYLZBfv/3f+KvYuXDkUGVIW9IAzmPNZDRL1I4A=="
},
"@rollup/plugin-babel": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
@ -27094,6 +27137,22 @@
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz",
"integrity": "sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A=="
},
"react-router": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.0.tgz",
"integrity": "sha512-B+5bEXFlgR1XUdHYR6P94g299SjrfCBMmEDJNcFbpAyRH1j1748yt9NdDhW3++nw1lk3zQJ6aOO66zUx3KlTZg==",
"requires": {
"@remix-run/router": "1.0.0"
}
},
"react-router-dom": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.0.tgz",
"integrity": "sha512-4Aw1xmXKeleYYQ3x0Lcl2undHR6yMjXZjd9DKZd53SGOYqirrUThyUb0wwAX5VZAyvSuzjNJmZlJ3rR9+/vzqg==",
"requires": {
"react-router": "6.4.0"
}
},
"react-scripts": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz",

View File

@ -14,6 +14,7 @@
"react-data-table-component": "^7.5.2",
"react-dom": "^18.2.0",
"react-flow-renderer": "^10.3.12",
"react-router-dom": "^6.4.0",
"react-scripts": "5.0.1",
"styled-components": "^5.3.5"
},
@ -41,5 +42,5 @@
"last 1 safari version"
]
},
"proxy": "http://localhost:18080"
"proxy": "https://api.zrok.io"
}

View File

@ -3,7 +3,7 @@ import Logout from './Logout';
import Network from './Network';
import Token from './Token';
import Version from './Version';
import {useEffect, useState} from "react";
import { useEffect, useState } from 'react';
const App = () => {
const [user, setUser] = useState();

7
ui/src/Register.js Normal file
View File

@ -0,0 +1,7 @@
const Register = () => {
return (
<h1>Register!</h1>
)
}
export default Register;

View File

@ -2,12 +2,25 @@ import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import Register from "./Register";
import * as gateway from "./api/gateway";
import {createBrowserRouter, RouterProvider} from "react-router-dom";
const router = createBrowserRouter([
{
path: "/",
element: <App />,
},
{
path: "/register",
element: <Register />,
}
]);
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
<RouterProvider router={router} />
</React.StrictMode>
);