Formatting
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
import { ThemeSwitcher } from "@/components/theme-switcher"
|
import { ThemeSwitcher } from "@/components/theme-switcher"
|
||||||
import { Button } from "@/components/ui/button"
|
|
||||||
import { Settings } from "lucide-react"
|
|
||||||
import Link from "next/link"
|
import Link from "next/link"
|
||||||
import { ReactNode } from "react"
|
import { ReactNode } from "react"
|
||||||
|
|
||||||
@@ -12,12 +10,7 @@ export default function RootLayout({ children }: Readonly<{ children: ReactNode
|
|||||||
<Link href="/">
|
<Link href="/">
|
||||||
<span className="text-lg font-semibold">Hypixel Stats</span>
|
<span className="text-lg font-semibold">Hypixel Stats</span>
|
||||||
</Link>
|
</Link>
|
||||||
<div className="flex items-center">
|
|
||||||
<ThemeSwitcher />
|
<ThemeSwitcher />
|
||||||
<Button variant="ghost" size="icon" aria-label="Settings">
|
|
||||||
<Settings className="w-5 h-5" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<div className="pt-header">
|
<div className="pt-header">
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import { SearchBar } from "@/components/search-bar"
|
import { SearchBar } from "@/components/search-bar"
|
||||||
import { ThemeSwitcher } from "@/components/theme-switcher"
|
import { ThemeSwitcher } from "@/components/theme-switcher"
|
||||||
import { Button } from "@/components/ui/button"
|
|
||||||
import { Settings } from "lucide-react"
|
|
||||||
import Link from "next/link"
|
import Link from "next/link"
|
||||||
import { ReactNode } from "react"
|
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>
|
<span className="text-lg font-semibold">Hypixel Stats</span>
|
||||||
</Link>
|
</Link>
|
||||||
<SearchBar navbar />
|
<SearchBar navbar />
|
||||||
<div className="flex items-center">
|
|
||||||
<ThemeSwitcher />
|
<ThemeSwitcher />
|
||||||
<Button variant="ghost" size="icon" aria-label="Settings">
|
|
||||||
<Settings className="w-5 h-5" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<div className="pt-header min-h-content">
|
<div className="pt-header min-h-content">
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { Card, CardContent } from "@/components/ui/card"
|
|||||||
import { getGuild } from "@/lib/hypixel/api/guild"
|
import { getGuild } from "@/lib/hypixel/api/guild"
|
||||||
import { getUuid } from "@/lib/hypixel/api/mojang"
|
import { getUuid } from "@/lib/hypixel/api/mojang"
|
||||||
import { getPlayer } from "@/lib/hypixel/api/player"
|
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 { Loader2Icon } from "lucide-react"
|
||||||
import { Suspense } from "react"
|
import { Suspense } from "react"
|
||||||
import Sidebar from "./_components/Sidebar"
|
import Sidebar from "./_components/Sidebar"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as React from "react"
|
|
||||||
import { Slot } from "@radix-ui/react-slot"
|
import { Slot } from "@radix-ui/react-slot"
|
||||||
import { cva, type VariantProps } from "class-variance-authority"
|
import { cva, type VariantProps } from "class-variance-authority"
|
||||||
|
import * as React from "react"
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
@@ -9,29 +9,26 @@ const buttonVariants = cva(
|
|||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default:
|
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
||||||
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
||||||
destructive:
|
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",
|
"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:
|
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",
|
"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:
|
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
||||||
"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
||||||
ghost:
|
link: "text-primary underline-offset-4 hover:underline"
|
||||||
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
||||||
link: "text-primary underline-offset-4 hover:underline",
|
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
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",
|
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",
|
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
||||||
icon: "size-9",
|
icon: "size-9"
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
variant: "default",
|
variant: "default",
|
||||||
size: "default",
|
size: "default"
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -41,8 +38,10 @@ function Button({
|
|||||||
size,
|
size,
|
||||||
asChild = false,
|
asChild = false,
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<"button"> &
|
}:
|
||||||
VariantProps<typeof buttonVariants> & {
|
& React.ComponentProps<"button">
|
||||||
|
& VariantProps<typeof buttonVariants>
|
||||||
|
& {
|
||||||
asChild?: boolean
|
asChild?: boolean
|
||||||
}) {
|
}) {
|
||||||
const Comp = asChild ? Slot : "button"
|
const Comp = asChild ? Slot : "button"
|
||||||
|
|||||||
@@ -81,12 +81,4 @@ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle }
|
||||||
Card,
|
|
||||||
CardHeader,
|
|
||||||
CardFooter,
|
|
||||||
CardTitle,
|
|
||||||
CardAction,
|
|
||||||
CardDescription,
|
|
||||||
CardContent,
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -30,4 +30,4 @@ function CollapsibleContent({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Collapsible, CollapsibleTrigger, CollapsibleContent }
|
export { Collapsible, CollapsibleContent, CollapsibleTrigger }
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import * as React from "react"
|
|
||||||
import * as SeparatorPrimitive from "@radix-ui/react-separator"
|
import * as SeparatorPrimitive from "@radix-ui/react-separator"
|
||||||
|
import * as React from "react"
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
|
|||||||
@@ -10,13 +10,11 @@ const Toaster = ({ ...props }: ToasterProps) => {
|
|||||||
<Sonner
|
<Sonner
|
||||||
theme={theme as ToasterProps["theme"]}
|
theme={theme as ToasterProps["theme"]}
|
||||||
className="toaster group"
|
className="toaster group"
|
||||||
style={
|
style={{
|
||||||
{
|
|
||||||
"--normal-bg": "var(--popover)",
|
"--normal-bg": "var(--popover)",
|
||||||
"--normal-text": "var(--popover-foreground)",
|
"--normal-text": "var(--popover-foreground)",
|
||||||
"--normal-border": "var(--border)",
|
"--normal-border": "var(--border)"
|
||||||
} as React.CSSProperties
|
} as React.CSSProperties}
|
||||||
}
|
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-slot="table-container"
|
data-slot="table-container"
|
||||||
className="relative w-full overflow-x-auto"
|
className="overflow-x-auto relative w-full"
|
||||||
>
|
>
|
||||||
<table
|
<table
|
||||||
data-slot="table"
|
data-slot="table"
|
||||||
@@ -104,13 +104,4 @@ function TableCaption({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow }
|
||||||
Table,
|
|
||||||
TableHeader,
|
|
||||||
TableBody,
|
|
||||||
TableFooter,
|
|
||||||
TableHead,
|
|
||||||
TableRow,
|
|
||||||
TableCell,
|
|
||||||
TableCaption,
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user