Formatting

This commit is contained in:
2025-08-30 14:09:47 +02:00
parent 8ceb9c7105
commit 3399485626
10 changed files with 243 additions and 277 deletions

View File

@@ -1,6 +1,4 @@
import { ThemeSwitcher } from "@/components/theme-switcher"
import { Button } from "@/components/ui/button"
import { Settings } from "lucide-react"
import Link from "next/link"
import { ReactNode } from "react"
@@ -12,12 +10,7 @@ export default function RootLayout({ children }: Readonly<{ children: ReactNode
<Link href="/">
<span className="text-lg font-semibold">Hypixel Stats</span>
</Link>
<div className="flex items-center">
<ThemeSwitcher />
<Button variant="ghost" size="icon" aria-label="Settings">
<Settings className="w-5 h-5" />
</Button>
</div>
</nav>
</header>
<div className="pt-header">

View File

@@ -1,7 +1,5 @@
import { SearchBar } from "@/components/search-bar"
import { ThemeSwitcher } from "@/components/theme-switcher"
import { Button } from "@/components/ui/button"
import { Settings } from "lucide-react"
import Link from "next/link"
import { ReactNode } from "react"
@@ -14,12 +12,7 @@ export default function StatsLayout({ children }: Readonly<{ children: ReactNode
<span className="text-lg font-semibold">Hypixel Stats</span>
</Link>
<SearchBar navbar />
<div className="flex items-center">
<ThemeSwitcher />
<Button variant="ghost" size="icon" aria-label="Settings">
<Settings className="w-5 h-5" />
</Button>
</div>
</nav>
</header>
<div className="pt-header min-h-content">

View File

@@ -3,7 +3,7 @@ import { Card, CardContent } from "@/components/ui/card"
import { getGuild } from "@/lib/hypixel/api/guild"
import { getUuid } from "@/lib/hypixel/api/mojang"
import { getPlayer } from "@/lib/hypixel/api/player"
import { getExactLevel } from "@/lib/hypixel/level"
import { getExactLevel } from "@/lib/hypixel/general/level"
import { Loader2Icon } from "lucide-react"
import { Suspense } from "react"
import Sidebar from "./_components/Sidebar"

View File

@@ -1,6 +1,6 @@
import * as React from "react"
import { Slot } from "@radix-ui/react-slot"
import { cva, type VariantProps } from "class-variance-authority"
import * as React from "react"
import { cn } from "@/lib/utils"
@@ -9,29 +9,26 @@ const buttonVariants = cva(
{
variants: {
variant: {
default:
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
destructive:
"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
outline:
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
secondary:
"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
ghost:
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
link: "text-primary underline-offset-4 hover:underline",
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
link: "text-primary underline-offset-4 hover:underline"
},
size: {
default: "h-9 px-4 py-2 has-[>svg]:px-3",
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
icon: "size-9",
},
icon: "size-9"
}
},
defaultVariants: {
variant: "default",
size: "default",
},
size: "default"
}
}
)
@@ -41,8 +38,10 @@ function Button({
size,
asChild = false,
...props
}: React.ComponentProps<"button"> &
VariantProps<typeof buttonVariants> & {
}:
& React.ComponentProps<"button">
& VariantProps<typeof buttonVariants>
& {
asChild?: boolean
}) {
const Comp = asChild ? Slot : "button"

View File

@@ -81,12 +81,4 @@ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
)
}
export {
Card,
CardHeader,
CardFooter,
CardTitle,
CardAction,
CardDescription,
CardContent,
}
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle }

View File

@@ -30,4 +30,4 @@ function CollapsibleContent({
)
}
export { Collapsible, CollapsibleTrigger, CollapsibleContent }
export { Collapsible, CollapsibleContent, CollapsibleTrigger }

View File

@@ -1,7 +1,7 @@
"use client"
import * as React from "react"
import * as SeparatorPrimitive from "@radix-ui/react-separator"
import * as React from "react"
import { cn } from "@/lib/utils"

View File

@@ -10,13 +10,11 @@ const Toaster = ({ ...props }: ToasterProps) => {
<Sonner
theme={theme as ToasterProps["theme"]}
className="toaster group"
style={
{
style={{
"--normal-bg": "var(--popover)",
"--normal-text": "var(--popover-foreground)",
"--normal-border": "var(--border)",
} as React.CSSProperties
}
"--normal-border": "var(--border)"
} as React.CSSProperties}
{...props}
/>
)

View File

@@ -8,7 +8,7 @@ function Table({ className, ...props }: React.ComponentProps<"table">) {
return (
<div
data-slot="table-container"
className="relative w-full overflow-x-auto"
className="overflow-x-auto relative w-full"
>
<table
data-slot="table"
@@ -104,13 +104,4 @@ function TableCaption({
)
}
export {
Table,
TableHeader,
TableBody,
TableFooter,
TableHead,
TableRow,
TableCell,
TableCaption,
}
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow }