Revert dynamic gridstack column count depending on sidebars

This commit is contained in:
Manuel
2023-01-14 22:51:39 +01:00
parent ad2c763133
commit e05278c618
2 changed files with 11 additions and 8 deletions

View File

@@ -28,16 +28,11 @@ export const useNamedWrapperColumnCount = (): 'small' | 'medium' | 'large' | nul
};
export const useWrapperColumnCount = () => {
const { config } = useConfigContext();
const numberOfSidebars =
(config?.settings.customization.layout.enabledLeftSidebar ? 1 : 0) +
(config?.settings.customization.layout.enabledRightSidebar ? 1 : 0);
switch (useNamedWrapperColumnCount()) {
case 'large':
return 15 - numberOfSidebars * 2;
return 12;
case 'medium':
return 9 - numberOfSidebars * 2;
return 6;
case 'small':
return 3;
default: