Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix: notification drawer without snappoints
Marc Seitz59bcd6eb7a3d
diff --git a/components/ui/drawer.tsx b/components/ui/drawer.tsxindex 7e02ac2a..5b7b491b 100644--- a/components/ui/drawer.tsx+++ b/components/ui/drawer.tsx@@ -42,7 +42,7 @@ const DrawerContent = React.forwardRef<<DrawerPrimitive.Contentref={ref}className={cn(- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",+ "fixed inset-x-0 bottom-0 z-50 flex h-auto flex-col rounded-t-[10px] border bg-background",className,)}onEscapeKeyDown={(e) => e.preventDefault()}diff --git a/components/upload-notification.tsx b/components/upload-notification.tsxindex 3b73fef3..873283f6 100644--- a/components/upload-notification.tsx+++ b/components/upload-notification.tsx@@ -1,5 +1,3 @@-import { useState } from "react";-import { CheckIcon, XIcon } from "lucide-react";import {@@ -10,8 +8,6 @@ import {DrawerTitle,} from "@/components/ui/drawer";-import { cn } from "@/lib/utils";-import { Gauge } from "./ui/gauge";export function UploadNotificationDrawer({@@ -33,15 +29,12 @@ export function UploadNotificationDrawer({}) {const uploadCount = uploads.length;const failedCount = rejectedFiles.length;- const [activeSnap, setActiveSnap] = useState<number | string | null>("250px");const onOpenChangeHandler = (open: boolean) => {onOpenChange(open);if (!open) {setUploads([]);setRejectedFiles([]);- } else {- setActiveSnap("250px");}};@@ -51,11 +44,9 @@ export function UploadNotificationDrawer({modal={false}open={open}onOpenChange={onOpenChangeHandler}- snapPoints={["40px", "250px"]}- activeSnapPoint={activeSnap}- setActiveSnapPoint={setActiveSnap}+ dismissible={false}>- <DrawerContent className="inset-x-auto right-6 h-full w-1/5 min-w-[350px] shadow-md focus-visible:outline-none">+ <DrawerContent className="inset-x-auto right-6 max-h-[250px] w-1/5 min-w-[350px] max-w-[400px] shadow-md focus-visible:outline-none"><DrawerHeader className="flex h-10 items-center justify-between rounded-t-lg border-b border-transparent bg-gray-100 dark:bg-gray-900"><div className="flex items-center space-x-1"><DrawerTitle>{uploadCount} uploads</DrawerTitle>@@ -71,20 +62,11 @@ export function UploadNotificationDrawer({<XIcon className="h-6 w-6" /></DrawerClose></DrawerHeader>- <div- className={cn(- "mx-auto flex w-full max-w-md grow flex-col *:px-4 *:py-3",-- {- "mb-[742px] overflow-y-auto": activeSnap === "250px",- "overflow-hidden": activeSnap !== "250px",- },- )}- >+ <div className="mx-auto flex w-full flex-1 flex-col overflow-y-auto">{uploads.map((upload, index) => (<divkey={index}- className="p-2 hover:bg-gray-100 hover:dark:bg-gray-900"+ className="px-4 py-3 hover:bg-gray-100 hover:dark:bg-gray-900"><ahref={`/documents/${upload.documentId}`}@@ -109,7 +91,7 @@ export function UploadNotificationDrawer({{rejectedFiles.map((rejected, index) => (<divkey={index}- className="flex items-center justify-between p-2 text-destructive hover:bg-gray-100 hover:dark:bg-gray-900"+ className="flex items-center justify-between px-4 py-3 text-destructive hover:bg-gray-100 hover:dark:bg-gray-900"><span>{rejected.fileName}</span><span>{rejected.message}</span>