mirror of
https://github.com/asimonson1125/asimonson1125.github.io.git
synced 2026-02-24 21:09:49 -06:00
patched hash routing
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "portfolio",
|
||||
"version": "0.1.0",
|
||||
"homepage": "http://asimonson1125.github.io",
|
||||
"homepage": "https://asimonson1125.github.io/",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@testing-library/jest-dom": "^5.11.4",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Route, Link, BrowserRouter as Router } from 'react-router-dom'
|
||||
import { Route, Link, HashRouter as Router } from 'react-router-dom'
|
||||
|
||||
import './App.css';
|
||||
import Nav from './componets/Nav.js'
|
||||
@@ -6,33 +6,29 @@ import Socials from './componets/Socials.js'
|
||||
import About from './componets/About.js'
|
||||
import Projects from './Projects';
|
||||
|
||||
const routs = (
|
||||
<Router>
|
||||
<div>
|
||||
<Route exact path='/' component={About} />
|
||||
<Route exact path='/projects' component={Projects} />
|
||||
</div>
|
||||
</Router>
|
||||
)
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<Router>
|
||||
<div className="App">
|
||||
<div className="header">
|
||||
<h1>Andrew Simonson</h1>
|
||||
<Nav>
|
||||
<a href='/'>Home</a>
|
||||
<Link to='/'>Home</Link>
|
||||
<a href='resume.pdf'>Resume</a>
|
||||
<a href='/projects'>Projects</a>
|
||||
<Link to='/projects'>Projects</Link>
|
||||
</Nav>
|
||||
</div>
|
||||
<div className='foreground'>
|
||||
{routs}
|
||||
|
||||
<Route exact path='/'><About /></Route>
|
||||
<Route exact path='/projects'><Projects /></Route>
|
||||
|
||||
</div>
|
||||
<div className='footer'>
|
||||
<Socials />
|
||||
</div>
|
||||
</div>
|
||||
</Router>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user