mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-23 19:05:16 +02:00
refactor(sidebar): remove sidebarWidth from context and update resize handling
This commit is contained in:
parent
9b1b5a504e
commit
315f4229f9
3 changed files with 15 additions and 20 deletions
|
|
@ -39,6 +39,7 @@ export function useSidebarResize(defaultWidth = SIDEBAR_MIN_WIDTH): UseSidebarRe
|
|||
// Persist width to cookie
|
||||
const persistWidth = useCallback((width: number) => {
|
||||
try {
|
||||
// biome-ignore lint/suspicious/noDocumentCookie: SSR-readable preference, not security-sensitive
|
||||
document.cookie = `${SIDEBAR_WIDTH_COOKIE_NAME}=${width}; path=/; max-age=${SIDEBAR_WIDTH_COOKIE_MAX_AGE}`;
|
||||
} catch {
|
||||
// Ignore cookie write errors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue