Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function legacyUrlSupport(state, navigate) {
const { location } = state;
const query = Router.parseQuery(location);
if (query.full === '1') {
state.ui.isFullscreen = true;
}
if (query.panel) {
if (['right', 'bottom'].includes(query.panel)) {
state.ui.panelPosition = query.panel;
} else if (query.panel === '0') {
state.ui.showPanel = false;
}
}
if (query.nav === '0') {
state.ui.showNav = false;
}
if (!query.path || query.path === '/') {