Fix missing header on single-example pages

This commit is contained in:
Mike Grabowski
2019-01-03 21:55:50 +01:00
parent c88a7ca24a
commit c8b1bdb88e
+4 -6
View File
@@ -38,12 +38,10 @@ class RNTesterExampleContainer extends React.Component {
return <this.props.module />;
}
if (this.props.module.examples.length === 1) {
const Example = this.props.module.examples[0].render;
return <Example />;
}
if (this.props.displayFilter === false) {
if (
this.props.displayFilter === false ||
this.props.module.examples.length === 1
) {
return (
<RNTesterPage title={this.props.title}>
{this.props.module.examples.map(this.renderExample)}