fix: ui fixes

This commit is contained in:
gosangam
2026-06-11 00:32:04 +05:30
parent 4b159cb4d9
commit ead8ad02e8
16 changed files with 769 additions and 266 deletions
+8
View File
@@ -7,10 +7,18 @@ import { cn } from "@/lib/utils";
const Drawer = ({
shouldScaleBackground = true,
// On iOS vaul freezes <body> (position:fixed) while the drawer is open and
// restores the old scroll offset on close. When a link inside the drawer
// navigates, that restore fires AFTER the route change and drags the new
// page to the previous page's scroll position — from the bottom of a long
// page it looks like the link simply didn't work. This flag makes vaul
// skip the restore when the URL changed; plain dismissals still restore.
preventScrollRestoration = true,
...props
}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (
<DrawerPrimitive.Root
shouldScaleBackground={shouldScaleBackground}
preventScrollRestoration={preventScrollRestoration}
{...props}
/>
);