plane/web/hooks/use-page-filters.ts
Aaryan Khandelwal eb0877a3c8
[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
2024-05-01 18:10:39 +05:30

13 lines
359 B
TypeScript

// 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,
};
};