Skip to content

Commit f434c46

Browse files
committed
code review fixes
1 parent e8c7e86 commit f434c46

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Apollo tutorial
22

3-
This is the fullstack app for the [Apollo tutorial](http://apollographql.com/docs/tutorial/introduction.html). 🚀
3+
This is the fullstack app for the [Apollo tutorial](https://www.apollographql.com/tutorials/fullstack-quickstart/introduction). 🚀
44

55
## File structure
66

77
The app is split out into two folders:
8+
89
- `start`: Starting point for the tutorial
910
- `final`: Final version
1011

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

start/client/src/index.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ import Pages from './pages';
66
import injectStyles from './styles';
77

88
// Initialize ApolloClient
9-
const client = new ApolloClient({
10-
cache,
11-
uri: 'http://localhost:4000/graphql',
12-
});
9+
1310

1411
injectStyles();
1512

@@ -20,4 +17,4 @@ root.render(
2017
<ApolloProvider client={client}>
2118
<Pages />
2219
</ApolloProvider>,
23-
);
20+
);

start/client/src/pages/index.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import React, { Fragment } from 'react';
2-
import {BrowserRouter as Router, Routes, Route } from 'react-router-dom'
1+
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'
32

43
import Launch from './launch';
54
import Launches from './launches';
@@ -10,17 +9,15 @@ import { Footer, PageContainer } from '../components';
109
export default function Pages() {
1110
return (
1211
<Router>
13-
<Fragment>
1412
<PageContainer>
1513
<Routes>
16-
<Route path="/" element={<Launches/>}/>
17-
<Route path="launch/:launchId" element={<Launch/>} />
18-
<Route path="cart" element={<Cart/>} />
19-
<Route path="profile" element={<Profile/>} />
14+
<Route path="/" element={<Launches />} />
15+
<Route path="launch/:launchId" element={<Launch />} />
16+
<Route path="cart" element={<Cart />} />
17+
<Route path="profile" element={<Profile />} />
2018
</Routes>
2119
</PageContainer>
2220
<Footer />
23-
</Fragment>
2421
</Router>
2522
);
2623
}

0 commit comments

Comments
 (0)