Merge pull request #8152 from RoadieHQ/sidebar-pin-default
Pin Sidebar by default
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Pin sidebar by default for easier navigation
|
||||
@@ -49,7 +49,7 @@ export type SidebarPinStateContextType = {
|
||||
|
||||
export const SidebarPinStateContext = createContext<SidebarPinStateContextType>(
|
||||
{
|
||||
isPinned: false,
|
||||
isPinned: true,
|
||||
toggleSidebarPinState: () => {},
|
||||
},
|
||||
);
|
||||
|
||||
@@ -24,10 +24,10 @@ export const LocalStorage = {
|
||||
try {
|
||||
value = JSON.parse(
|
||||
window.localStorage.getItem(LocalStorageKeys.SIDEBAR_PIN_STATE) ||
|
||||
'false',
|
||||
'true',
|
||||
);
|
||||
} catch {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
return !!value;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user