feat: refactor UI components and integrate new features

- Remove unused app.ts file.
- Enhance Home component with CNB integration for user authentication.
- Update root route to include Toaster component for notifications.
- Add Avatar, Badge, Card, Dialog, Dropdown Menu, Input, Label, Select, Separator, Sonner, Table, and Tabs components for improved UI.
- Create config page structure.
This commit is contained in:
2026-02-06 02:46:32 +08:00
parent 234dabcfb4
commit abd9860a90
17 changed files with 2336 additions and 430 deletions

View File

@@ -0,0 +1,29 @@
import { useTheme } from "next-themes"
import { Toaster as Sonner } from "sonner"
type ToasterProps = React.ComponentProps<typeof Sonner>
const Toaster = ({ ...props }: ToasterProps) => {
const { theme = "system" } = useTheme()
return (
<Sonner
theme={theme as ToasterProps["theme"]}
className="toaster group"
toastOptions={{
classNames: {
toast:
"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
description: "group-[.toast]:text-muted-foreground",
actionButton:
"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
cancelButton:
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
},
}}
{...props}
/>
)
}
export { Toaster }