Skip to content

Commit 08d8e4a

Browse files
committed
minor presentation changes
1 parent d7c4bb7 commit 08d8e4a

File tree

20 files changed

+114
-48
lines changed

20 files changed

+114
-48
lines changed

src/App.js

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
import './App.css';
2-
import React, {Component} from 'react';
3-
import {Canvas} from 'react-three-fiber';
4-
import {Strategy, changeRed} from './components/Strategy/Strategy';
5-
import {InputField} from './components/Canvas/InputField.js';
6-
import MainCanvas from './components/Canvas/MainCanvas';
7-
import SelectionSort from './components/Strategy/Algorithms/SelectionSort';
8-
import {
9-
BrowserRouter as Router,
10-
Switch,
11-
Route,
12-
Link,
13-
} from 'react-router-dom';
14-
import Header from './partial/Header';
15-
import Selection from './partial/Selection';
16-
import Footer from './partial/Footer';
17-
import SplashScreen from './components/Page/Splash/SplashScreen';
18-
import {Routes} from 'react-router';
19-
import Box from './modals/cube/Box';
2+
import React, {Component} from 'react';
3+
import {Canvas} from 'react-three-fiber';
4+
5+
import {Strategy /*changeRed*/} from './components/Strategy/Strategy';
6+
import {InputField} from './components/Canvas/InputField.js';
7+
import MainCanvas from './components/Canvas/MainCanvas';
8+
import SelectionSort from './components/Strategy/Algorithms/SelectionSort';
9+
10+
import Header from './partial/Header';
11+
import Selection from './partial/Selection';
12+
import Footer from './partial/Footer';
13+
import SplashScreen from './components/Page/Splash/SplashScreen';
14+
import Box from './modals/cube/Box';
15+
import AppRouter from './AppRouter';
2016

2117

2218

@@ -40,22 +36,10 @@ class App extends Component {
4036

4137
return (
4238
<>
43-
<Router>
44-
{/*<Layout>*/}
45-
<Routes>
46-
47-
<Route exact path = "/about" element = {<About/>}/>
48-
<Route exact path = "/home" element = {<MainCanvas/>}/>
49-
<Route exact path = "/" element = {<SplashScreen/>}/>
50-
{/*<Route exact path = "/" element = {<MainCanvas/>}/>*/}
51-
</Routes>
52-
{/*<Box/>*/}
53-
</Router>
54-
<div className = "App">
55-
<Header/>
56-
<Selection/>
57-
<Footer/>
58-
</div>
39+
<div className = "App">
40+
<AppRouter/>
41+
42+
</div>
5943

6044
</>
6145
);

src/AppRouter.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import React from 'react';
2+
import {
3+
BrowserRouter as Router,
4+
Routes,
5+
Route,
6+
Link, BrowserRouter,
7+
} from 'react-router-dom';
8+
import SplashScreen from './components/Page/Splash/SplashScreen';
9+
import MainCanvas from './components/Canvas/MainCanvas';
10+
import AboutScreen from './components/Page/About/AboutScreen';
11+
import ContactScreen from './components/Page/Contact/ContactScreen';
12+
13+
14+
15+
function AppRouter() {
16+
return (
17+
<Router>
18+
<Routes>
19+
<Route exact path = "/"
20+
element = {<SplashScreen/>}/>
21+
<Route path = "/about"
22+
element = {<AboutScreen/>}/>
23+
<Route path = "/contact"
24+
element = {<ContactScreen/>}/>
25+
<Route path = "/home"
26+
element = {<MainCanvas/>}/>
27+
</Routes>
28+
</Router>
29+
);
30+
}
31+
32+
33+
export default AppRouter;

src/App.test.js renamed to src/Utility/App.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { render, screen } from '@testing-library/react';
2-
import App from './App';
2+
import App from '../App';
33

44
test('renders learn react link', () => {
55
render(<App />);
File renamed without changes.
File renamed without changes.

src/components/Canvas/Canvas.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Component } from 'react'
2-
import { CONSTANTS } from '../../config.js';
2+
import { CONSTANTS } from '../../Utility/config.js';
33

44
class Canvas extends Component {
55

0 commit comments

Comments
 (0)