Commit c674f2b1 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

apdet

See merge request !1
parents fa7ea43b 1ed64308
...@@ -163,7 +163,7 @@ export default function MiniDrawer() { ...@@ -163,7 +163,7 @@ export default function MiniDrawer() {
<List> <List>
{['All mail', 'Trash', 'Spam'].map((text, index) => ( {['All mail', 'Trash', 'Spam'].map((text, index) => (
<ListItem button key={text}> <ListItem button key={text}>
<ListItemIcon>{index % 2 === 0 ? <InboxIcon /> : <MailIcon />}</ListItemIcon> <ListItemIcon>{index % 2 === 0 ? <Link to={`${url}/rendering`}><InboxIcon /></Link> : <Link to={`${url}/components`}><MailIcon /></Link>}</ListItemIcon>
<ListItemText primary={text} /> <ListItemText primary={text} />
</ListItem> </ListItem>
))} ))}
...@@ -171,27 +171,17 @@ export default function MiniDrawer() { ...@@ -171,27 +171,17 @@ export default function MiniDrawer() {
</Drawer> </Drawer>
<main className={classes.content}> <main className={classes.content}>
<div className={classes.toolbar} /> <div className={classes.toolbar} />
<h2>Topics</h2>
<ul>
<li>
<Link to={`${url}/rendering`}>Rendering with React</Link>
</li>
<li>
<Link to={`${url}/components`}>Components</Link>
</li>
<li>
<Link to={`${url}/props-v-state`}>Props v. State</Link>
</li>
</ul>
<Switch> <Switch>
<Route exact path={path}> <Route exact path={path}>
<h3>Please select a topic.</h3> <h3>Please select a topic.</h3>
</Route> </Route>
<Route path={`${path}/:topicId`}> <Route path={`${path}/:topicId`}>
<Topic /> <Topic />
</Route> </Route>
</Switch> </Switch>
<div style={{height: 100, width: '100%', backgroundColor: 'red', justifyContent:'flex-end'}}>
</div>
</main> </main>
</div> </div>
); );
...@@ -203,7 +193,9 @@ function Topic() { ...@@ -203,7 +193,9 @@ function Topic() {
// of the URL indicates a placeholder that we can // of the URL indicates a placeholder that we can
// get from `useParams()`. // get from `useParams()`.
let { topicId } = useParams(); let { topicId } = useParams();
React.useEffect(() => {
alert(topicId)
})
return ( return (
<div> <div>
<h3>{topicId}</h3> <h3>{topicId}</h3>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment