chore: fixed sidebar not opening in mobile 48c671f2
Steve · 2025-11-01 23:36 1 file(s) · +2 −6
src/components/ui/sidebar.tsx +2 −6
296 296
	onClick,
297 297
	...props
298 298
}: React.ComponentProps<typeof Button>) {
299 -
	const { hideSidebar, showSidebar, hidden } = useSidebar();
299 +
	const { toggleSidebar } = useSidebar();
300 300
301 301
	return (
302 302
		<Button
307 307
			className={cn("size-7", className)}
308 308
			onClick={(event) => {
309 309
				onClick?.(event);
310 -
				if (hidden) {
311 -
					showSidebar();
312 -
				} else {
313 -
					hideSidebar();
314 -
				}
310 +
				toggleSidebar();
315 311
			}}
316 312
			{...props}
317 313
		>