[WEB-1135] chore: store page full width information in local storage (#4327)
* chore: store page full width information in local storage * chore: update page types
This commit is contained in:
parent
73fd6e641c
commit
eb0877a3c8
7 changed files with 32 additions and 74 deletions
12
web/hooks/use-page-filters.ts
Normal file
12
web/hooks/use-page-filters.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// hooks
|
||||
import useLocalStorage from "@/hooks/use-local-storage";
|
||||
|
||||
export const usePageFilters = () => {
|
||||
const { storedValue: isFullWidth, setValue: setFullWidth } = useLocalStorage<boolean>("page_full_width", true);
|
||||
const handleFullWidth = (value: boolean) => setFullWidth(value);
|
||||
|
||||
return {
|
||||
isFullWidth: !!isFullWidth,
|
||||
handleFullWidth,
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue