Commit a70f7129 authored by Martin Wortschack's avatar Martin Wortschack Committed by Phil Hughes

Replace breakpoints with GlBreakpointInstance in sidebar_context.js

parent f4e621e7
import $ from 'jquery'; import $ from 'jquery';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import bp from '~/breakpoints'; import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils';
export default class SidebarContext { export default class SidebarContext {
constructor() { constructor() {
...@@ -32,7 +32,7 @@ export default class SidebarContext { ...@@ -32,7 +32,7 @@ export default class SidebarContext {
window.addEventListener('beforeunload', () => { window.addEventListener('beforeunload', () => {
// collapsed_gutter cookie hides the sidebar // collapsed_gutter cookie hides the sidebar
const bpBreakpoint = bp.getBreakpointSize(); const bpBreakpoint = bp.getBreakpointSize();
if (bpBreakpoint === 'xs' || bpBreakpoint === 'sm') { if (bpBreakpoint === 'xs' || bpBreakpoint === 'sm' || bpBreakpoint === 'md') {
Cookies.set('collapsed_gutter', true); Cookies.set('collapsed_gutter', true);
} }
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment