diff --git a/app/src/components/app/Announcement.tsx b/app/src/components/app/Announcement.tsx index aaf4ead..a03743b 100644 --- a/app/src/components/app/Announcement.tsx +++ b/app/src/components/app/Announcement.tsx @@ -1,16 +1,16 @@ import { useTranslation } from "react-i18next"; import { useEffect, useState } from "react"; import { - AlertDialog, - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, - AlertDialogTrigger, -} from "@/components/ui/alert-dialog"; + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, + DialogTrigger, + DialogAction, + DialogCancel, +} from "@/components/ui/dialog"; import { AnnouncementEvent, announcementEvent } from "@/events/announcement.ts"; import { Bell, Check } from "lucide-react"; import Markdown from "@/components/Markdown.tsx"; @@ -32,8 +32,8 @@ function Announcement() { }, []); return ( - - + + - - - - + + +

{t("announcement")}

-
- + + {announcement || t("empty")} - -
- - {t("close")} - + + + + setOpen(false)}>{t("close")} + setOpen(false)}> {t("i-know")} - - -
-
+ + + + ); } diff --git a/app/src/components/ui/dialog.tsx b/app/src/components/ui/dialog.tsx index 27dba1e..5d7d90e 100644 --- a/app/src/components/ui/dialog.tsx +++ b/app/src/components/ui/dialog.tsx @@ -3,6 +3,7 @@ import * as DialogPrimitive from "@radix-ui/react-dialog"; import { X } from "lucide-react"; import { cn } from "./lib/utils"; +import { Button, ButtonProps } from "@/components/ui/button.tsx"; const Dialog = DialogPrimitive.Root; @@ -61,11 +62,13 @@ DialogContent.displayName = DialogPrimitive.Content.displayName; const DialogHeader = ({ className, + notTextCentered, ...props -}: React.HTMLAttributes) => ( +}: React.HTMLAttributes & {notTextCentered?: boolean}) => (
( + ({ className, variant, ...props }, ref) => ( +