diff --git a/src/app/(stats)/layout.tsx b/src/app/(stats)/layout.tsx
index fe148f9..a160b99 100644
--- a/src/app/(stats)/layout.tsx
+++ b/src/app/(stats)/layout.tsx
@@ -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
diff --git a/src/app/(stats)/player/[ign]/page.tsx b/src/app/(stats)/player/[ign]/page.tsx
index 7116580..0bf4a4d 100644
--- a/src/app/(stats)/player/[ign]/page.tsx
+++ b/src/app/(stats)/player/[ign]/page.tsx
@@ -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"
diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx
index a2df8dc..4ccf1e7 100644
--- a/src/components/ui/button.tsx
+++ b/src/components/ui/button.tsx
@@ -1,59 +1,58 @@
-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"
const buttonVariants = cva(
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
- {
- variants: {
- variant: {
- 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",
- },
- 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",
- },
- },
- defaultVariants: {
- variant: "default",
- size: "default",
- },
- }
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
+ {
+ variants: {
+ variant: {
+ 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"
+ },
+ 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"
+ }
+ },
+ defaultVariants: {
+ variant: "default",
+ size: "default"
+ }
+ }
)
function Button({
- className,
- variant,
- size,
- asChild = false,
- ...props
-}: React.ComponentProps<"button"> &
- VariantProps
& {
- asChild?: boolean
- }) {
- const Comp = asChild ? Slot : "button"
+ className,
+ variant,
+ size,
+ asChild = false,
+ ...props
+}:
+ & React.ComponentProps<"button">
+ & VariantProps
+ & {
+ asChild?: boolean
+ }) {
+ const Comp = asChild ? Slot : "button"
- return (
-
- )
+ return (
+
+ )
}
export { Button, buttonVariants }
diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx
index d05bbc6..7472a26 100644
--- a/src/components/ui/card.tsx
+++ b/src/components/ui/card.tsx
@@ -3,90 +3,82 @@ import * as React from "react"
import { cn } from "@/lib/utils"
function Card({ className, ...props }: React.ComponentProps<"div">) {
- return (
-
- )
+ return (
+
+ )
}
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
- return (
-
- )
+ return (
+
+ )
}
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
- return (
-
- )
+ return (
+
+ )
}
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
- return (
-
- )
+ return (
+
+ )
}
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
- return (
-
- )
+ return (
+
+ )
}
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
- return (
-
- )
+ return (
+
+ )
}
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
- return (
-
- )
+ return (
+
+ )
}
-export {
- Card,
- CardHeader,
- CardFooter,
- CardTitle,
- CardAction,
- CardDescription,
- CardContent,
-}
+export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle }
diff --git a/src/components/ui/collapsible.tsx b/src/components/ui/collapsible.tsx
index ae9fad0..3c323ca 100644
--- a/src/components/ui/collapsible.tsx
+++ b/src/components/ui/collapsible.tsx
@@ -3,31 +3,31 @@
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
function Collapsible({
- ...props
+ ...props
}: React.ComponentProps) {
- return
+ return
}
function CollapsibleTrigger({
- ...props
+ ...props
}: React.ComponentProps) {
- return (
-
- )
+ return (
+
+ )
}
function CollapsibleContent({
- ...props
+ ...props
}: React.ComponentProps) {
- return (
-
- )
+ return (
+
+ )
}
-export { Collapsible, CollapsibleTrigger, CollapsibleContent }
+export { Collapsible, CollapsibleContent, CollapsibleTrigger }
diff --git a/src/components/ui/input.tsx b/src/components/ui/input.tsx
index 03295ca..dc01129 100644
--- a/src/components/ui/input.tsx
+++ b/src/components/ui/input.tsx
@@ -3,19 +3,19 @@ import * as React from "react"
import { cn } from "@/lib/utils"
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
- return (
-
- )
+ return (
+
+ )
}
export { Input }
diff --git a/src/components/ui/separator.tsx b/src/components/ui/separator.tsx
index 275381c..01de97c 100644
--- a/src/components/ui/separator.tsx
+++ b/src/components/ui/separator.tsx
@@ -1,28 +1,28 @@
"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"
function Separator({
- className,
- orientation = "horizontal",
- decorative = true,
- ...props
+ className,
+ orientation = "horizontal",
+ decorative = true,
+ ...props
}: React.ComponentProps) {
- return (
-
- )
+ return (
+
+ )
}
export { Separator }
diff --git a/src/components/ui/sonner.tsx b/src/components/ui/sonner.tsx
index 957524e..339af0c 100644
--- a/src/components/ui/sonner.tsx
+++ b/src/components/ui/sonner.tsx
@@ -4,22 +4,20 @@ import { useTheme } from "next-themes"
import { Toaster as Sonner, ToasterProps } from "sonner"
const Toaster = ({ ...props }: ToasterProps) => {
- const { theme = "system" } = useTheme()
+ const { theme = "system" } = useTheme()
- return (
-
- )
+ return (
+
+ )
}
export { Toaster }
diff --git a/src/components/ui/table.tsx b/src/components/ui/table.tsx
index 51b74dd..ab1c202 100644
--- a/src/components/ui/table.tsx
+++ b/src/components/ui/table.tsx
@@ -5,112 +5,103 @@ import * as React from "react"
import { cn } from "@/lib/utils"
function Table({ className, ...props }: React.ComponentProps<"table">) {
- return (
-
- )
+ return (
+
+ )
}
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
- return (
-
- )
+ return (
+
+ )
}
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
- return (
-
- )
+ return (
+
+ )
}
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
- return (
- tr]:last:border-b-0",
- className
- )}
- {...props}
- />
- )
+ return (
+ tr]:last:border-b-0",
+ className
+ )}
+ {...props}
+ />
+ )
}
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
- return (
-
- )
+ return (
+
+ )
}
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
- return (
- [role=checkbox]]:translate-y-[2px]",
- className
- )}
- {...props}
- />
- )
+ return (
+ | [role=checkbox]]:translate-y-[2px]",
+ className
+ )}
+ {...props}
+ />
+ )
}
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
- return (
- | [role=checkbox]]:translate-y-[2px]",
- className
- )}
- {...props}
- />
- )
+ return (
+ | [role=checkbox]]:translate-y-[2px]",
+ className
+ )}
+ {...props}
+ />
+ )
}
function TableCaption({
- className,
- ...props
+ className,
+ ...props
}: React.ComponentProps<"caption">) {
- return (
-
- )
+ return (
+
+ )
}
-export {
- Table,
- TableHeader,
- TableBody,
- TableFooter,
- TableHead,
- TableRow,
- TableCell,
- TableCaption,
-}
+export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow }
|