Skip to content

Commit 07ee420

Browse files
committed
feat(contact): added a link to the primary nav
1 parent 126127c commit 07ee420

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/molecules/navigation/presentational-test.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import {IconButton, List, ListItem, ListItemIcon, ListItemText, SwipeableDrawer} from '@material-ui/core';
3-
import {ChevronLeft, Dvr, Home} from '@material-ui/icons';
3+
import {ChevronLeft, Dvr, Home, MailOutline} from '@material-ui/icons';
44
import travi from 'travi';
55
import {shallow} from 'enzyme';
66
import {assert} from 'chai';
@@ -39,5 +39,11 @@ suite('navigation-drawer', () => {
3939
assert.equal(presentationsNavItem.prop('href'), 'https://presentations.travi.org');
4040
assert.equal(presentationsNavItem.find(ListItemText).prop('primary'), 'Presentations');
4141
assert.isTrue(presentationsNavItem.find(ListItemIcon).find(Dvr).exists());
42+
43+
const contatNavItem = navList.find(ListItem).at(2);
44+
assert.equal(contatNavItem.prop('component'), 'a');
45+
assert.equal(contatNavItem.prop('href'), 'https://matt.travi.org/contact');
46+
assert.equal(contatNavItem.find(ListItemText).prop('primary'), 'Contact');
47+
assert.isTrue(contatNavItem.find(ListItemIcon).find(MailOutline).exists());
4248
});
4349
});

src/molecules/navigation/presentational.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
SwipeableDrawer,
1111
withStyles
1212
} from '@material-ui/core';
13-
import {ChevronLeft, Dvr, Home} from '@material-ui/icons';
13+
import {ChevronLeft, Dvr as PresentationsIcon, Home, MailOutline as ContactIcon} from '@material-ui/icons';
1414
import travi from 'travi';
1515
import {styles} from './styles';
1616

@@ -34,9 +34,13 @@ export function NavigationDrawer({open, onToggle, classes}) {
3434
<ListItemText primary="Home" />
3535
</ListItem>
3636
<ListItem button component="a" href="https://presentations.travi.org">
37-
<ListItemIcon><Dvr /></ListItemIcon>
37+
<ListItemIcon><PresentationsIcon /></ListItemIcon>
3838
<ListItemText primary="Presentations" />
3939
</ListItem>
40+
<ListItem button component="a" href="https://matt.travi.org/contact">
41+
<ListItemIcon><ContactIcon /></ListItemIcon>
42+
<ListItemText primary="Contact" />
43+
</ListItem>
4044
</List>
4145
</SwipeableDrawer>
4246
);

0 commit comments

Comments
 (0)