Hide side panel on small screens

This commit is contained in:
Przemek Wiech 2019-03-07 23:44:14 +01:00
parent 2c030ec970
commit f4f9bf70ea

View File

@ -5,7 +5,7 @@ import {Details} from './details';
import {getSelection, loadFromUrl, loadGedcom} from './load_data';
import {IndiInfo} from 'topola';
import {Intro} from './intro';
import {Loader, Message} from 'semantic-ui-react';
import {Loader, Message, Responsive} from 'semantic-ui-react';
import {Redirect, Route, RouteComponentProps, Switch} from 'react-router-dom';
import {TopBar} from './top_bar';
import {TopolaData} from './gedcom_util';
@ -158,12 +158,12 @@ export class App extends React.Component<RouteComponentProps, {}> {
ref={(ref) => (this.chartRef = ref)}
/>
{this.state.showSidePanel ? (
<div id="sidePanel">
<Responsive minWidth={768} id="sidePanel">
<Details
gedcom={this.state.data.gedcom}
indi={this.state.selection.id}
/>
</div>
</Responsive>
) : null}
</div>
);