Skip to content

Commit 4d1becb

Browse files
committed
🎨 Defines structure
1 parent f0611f9 commit 4d1becb

File tree

7 files changed

+53
-24
lines changed

7 files changed

+53
-24
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,8 @@
3737
"last 1 firefox version",
3838
"last 1 safari version"
3939
]
40+
},
41+
"devDependencies": {
42+
"@types/react-router-dom": "^5.1.5"
4043
}
4144
}

src/App.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/index.css

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +0,0 @@
1-
body {
2-
margin: 0;
3-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4-
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5-
sans-serif;
6-
-webkit-font-smoothing: antialiased;
7-
-moz-osx-font-smoothing: grayscale;
8-
}
9-
10-
code {
11-
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12-
monospace;
13-
}

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
33
import './index.css';
4-
import App from './App';
4+
import Routes from './pages/routes';
55

66
ReactDOM.render(
77
<React.StrictMode>
8-
<App />
8+
<Routes />
99
</React.StrictMode>,
1010
document.getElementById('root')
1111
);

src/pages/Home/index.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
3+
const Home: React.FC = () => {
4+
return (
5+
<div>
6+
<h1>Hello World :)</h1>
7+
</div>
8+
);
9+
}
10+
11+
export default Home;

src/pages/routes.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react';
2+
import { BrowserRouter, Route, Switch } from 'react-router-dom';
3+
import Home from './Home';
4+
5+
const Routes: React.FC = () => {
6+
return (
7+
<BrowserRouter>
8+
<Switch>
9+
<Route path="/" component={Home} />
10+
</Switch>
11+
</BrowserRouter>
12+
);
13+
}
14+
15+
export default Routes;

yarn.lock

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,11 @@
15341534
"@types/minimatch" "*"
15351535
"@types/node" "*"
15361536

1537+
"@types/history@*":
1538+
version "4.7.7"
1539+
resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.7.tgz#613957d900fab9ff84c8dfb24fa3eef0c2a40896"
1540+
integrity sha512-2xtoL22/3Mv6a70i4+4RB7VgbDDORoWwjcqeNysojZA0R7NK17RbY5Gof/2QiFfJgX+KkWghbwJ+d/2SB8Ndzg==
1541+
15371542
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
15381543
version "2.0.1"
15391544
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff"
@@ -1615,6 +1620,23 @@
16151620
dependencies:
16161621
"@types/react" "*"
16171622

1623+
"@types/react-router-dom@^5.1.5":
1624+
version "5.1.5"
1625+
resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.1.5.tgz#7c334a2ea785dbad2b2dcdd83d2cf3d9973da090"
1626+
integrity sha512-ArBM4B1g3BWLGbaGvwBGO75GNFbLDUthrDojV2vHLih/Tq8M+tgvY1DSwkuNrPSwdp/GUL93WSEpTZs8nVyJLw==
1627+
dependencies:
1628+
"@types/history" "*"
1629+
"@types/react" "*"
1630+
"@types/react-router" "*"
1631+
1632+
"@types/react-router@*":
1633+
version "5.1.8"
1634+
resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.8.tgz#4614e5ba7559657438e17766bb95ef6ed6acc3fa"
1635+
integrity sha512-HzOyJb+wFmyEhyfp4D4NYrumi+LQgQL/68HvJO+q6XtuHSDvw6Aqov7sCAhjbNq3bUPgPqbdvjXC5HeB2oEAPg==
1636+
dependencies:
1637+
"@types/history" "*"
1638+
"@types/react" "*"
1639+
16181640
"@types/react@*", "@types/react@^16.9.0":
16191641
version "16.9.49"
16201642
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.49.tgz#09db021cf8089aba0cdb12a49f8021a69cce4872"

0 commit comments

Comments
 (0)