Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
patterns: PropTypes.array,
displayMode: PropTypes.string,
allSections: PropTypes.array.isRequired,
pagePerSection: PropTypes.bool
}
static childContextTypes = {
codeRevision: PropTypes.number.isRequired,
config: PropTypes.object.isRequired,
slots: PropTypes.object.isRequired,
displayMode: PropTypes.string,
renderRootJsx: PropTypes.object
}
static defaultProps = {
displayMode: DisplayModes.all
}
state = {
error: false,
info: null
}
getChildContext() {
return {
codeRevision: this.props.codeRevision,
config: this.props.config,
slots: this.props.slots,
displayMode: this.props.displayMode,
renderRootJsx: this.props.renderRootJsx
}
}
function hasSidebar(displayMode, showSidebar) {
return (
displayMode === DisplayModes.notFound ||
(showSidebar && displayMode === DisplayModes.all)
);
}
welcomeScreen: PropTypes.bool,
patterns: PropTypes.array,
displayMode: PropTypes.string,
allSections: PropTypes.array.isRequired,
pagePerSection: PropTypes.bool,
};
static childContextTypes = {
codeRevision: PropTypes.number.isRequired,
config: PropTypes.object.isRequired,
slots: PropTypes.object.isRequired,
displayMode: PropTypes.string,
};
static defaultProps = {
displayMode: DisplayModes.all,
};
state = {
error: false,
info: null,
};
getChildContext() {
return {
codeRevision: this.props.codeRevision,
config: this.props.config,
slots: this.props.slots,
displayMode: this.props.displayMode,
};
}