feat: stand up Home page

This commit is contained in:
Jeremy Kahn 2022-08-09 21:28:46 -05:00
parent 90379b2c03
commit be4947a80b
5 changed files with 25 additions and 3 deletions

View File

@ -1,8 +1,15 @@
import React from 'react' import React from 'react'
import { render } from '@testing-library/react' import { render } from '@testing-library/react'
import { MemoryRouter as Router } from 'react-router-dom'
import Bootstrap from './Bootstrap' import Bootstrap from './Bootstrap'
const StubBootstrap = () => (
<Router>
<Bootstrap />
</Router>
)
test('renders', () => { test('renders', () => {
render(<Bootstrap />) render(<StubBootstrap />)
}) })

View File

@ -1,7 +1,16 @@
import React from 'react' import React from 'react'
import { Routes, Route } from 'react-router-dom'
import { Home } from './pages/Home/'
function Bootstrap() { function Bootstrap() {
return <div className="Chitchatter"></div> return (
<div className="Chitchatter">
<Routes>
<Route path="/" element={<Home />} />
</Routes>
</div>
)
} }
export default Bootstrap export default Bootstrap

View File

@ -1,6 +1,6 @@
import React from 'react' import React from 'react'
import ReactDOM from 'react-dom/client' import ReactDOM from 'react-dom/client'
import { HashRouter as Router } from 'react-router-dom' import { BrowserRouter as Router } from 'react-router-dom'
import * as serviceWorkerRegistration from './serviceWorkerRegistration' import * as serviceWorkerRegistration from './serviceWorkerRegistration'
import './index.sass' import './index.sass'

5
src/pages/Home/Home.tsx Normal file
View File

@ -0,0 +1,5 @@
import React from 'react'
export function Home() {
return <div className="Home"></div>
}

1
src/pages/Home/index.ts Normal file
View File

@ -0,0 +1 @@
export * from './Home'