Skip to content
Snippets Groups Projects
Commit 002c59fb authored by esikkala's avatar esikkala
Browse files

Render first tab as default

parent 8c9e9946
No related branches found
No related tags found
No related merge requests found
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import { has } from 'lodash';
import Tabs from '@material-ui/core/Tabs';
import Tab from '@material-ui/core/Tab';
import CalendarViewDayIcon from '@material-ui/icons/CalendarViewDay';
......@@ -34,7 +35,7 @@ class ViewTabs extends React.Component {
}
pathnameToValue = pathname => {
return this.props.tabs[pathname].value;
return has(this.props.tabs, pathname) ? this.props.tabs[pathname].value : 0;
}
renderIcon = iconString => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment