chore: Run Biome checks and apply fixes

This commit is contained in:
Bjorn Lammers 2025-04-25 23:13:43 +02:00
parent 83a678f5ae
commit 860321a6aa
7 changed files with 333 additions and 334 deletions

View File

@ -31,9 +31,7 @@ export default function ErrorPage({
<AlertTriangle className="w-8 h-8" /> <AlertTriangle className="w-8 h-8" />
</div> </div>
<h1 className="text-2xl font-bold">Something went wrong</h1> <h1 className="text-2xl font-bold">Something went wrong</h1>
<p className="text-muted-foreground"> <p className="text-muted-foreground">Unable to load this page. We're looking into the issue.</p>
Unable to load this page. We're looking into the issue.
</p>
<div className="flex flex-col sm:flex-row gap-4 justify-center pt-4"> <div className="flex flex-col sm:flex-row gap-4 justify-center pt-4">
<Button variant="outline" onClick={() => reset()} className="cursor-pointer"> <Button variant="outline" onClick={() => reset()} className="cursor-pointer">
<RefreshCcw className="mr-2 h-4 w-4" /> <RefreshCcw className="mr-2 h-4 w-4" />

View File

@ -16,9 +16,7 @@ export default function NotFound({
<AlertTriangle className="w-8 h-8" /> <AlertTriangle className="w-8 h-8" />
</div> </div>
<h1 className="text-2xl sm:text-3xl font-bold mt-6">Not found</h1> <h1 className="text-2xl sm:text-3xl font-bold mt-6">Not found</h1>
<p className="text-muted-foreground mt-3 max-w-md"> <p className="text-muted-foreground mt-3 max-w-md">This icon does not exist or could not be loaded.</p>
This icon does not exist or could not be loaded.
</p>
</div> </div>
<div className="flex flex-col sm:flex-row gap-4 justify-center"> <div className="flex flex-col sm:flex-row gap-4 justify-center">
@ -33,9 +31,7 @@ export default function NotFound({
<div className="border-t border-border pt-8 mt-8"> <div className="border-t border-border pt-8 mt-8">
<div className="text-center mb-6"> <div className="text-center mb-6">
<h2 className="text-xl font-semibold">Missing an icon?</h2> <h2 className="text-xl font-semibold">Missing an icon?</h2>
<p className="text-muted-foreground mt-2"> <p className="text-muted-foreground mt-2">Submit a new icon or suggest improvements to our collection.</p>
Submit a new icon or suggest improvements to our collection.
</p>
</div> </div>
<div className="mt-6"> <div className="mt-6">

View File

@ -216,19 +216,19 @@ export function HeroSection({ totalIcons, stars }: { totalIcons: number; stars:
transition={{ transition={{
duration: 0.5, duration: 0.5,
delay: 0.3, delay: 0.3,
ease: "easeOut" ease: "easeOut",
}} }}
> >
<motion.div <motion.div
animate={{ animate={{
y: [0, -3, 0], y: [0, -3, 0],
rotate: [0, 5, 0] rotate: [0, 5, 0],
}} }}
transition={{ transition={{
duration: 3, duration: 3,
repeat: Infinity, repeat: Number.POSITIVE_INFINITY,
repeatType: "reverse", repeatType: "reverse",
ease: "easeInOut" ease: "easeInOut",
}} }}
> >
<Sparkles className="text-rose-500 h-8 w-8 sm:h-12 sm:w-12 md:h-16 md:w-12" /> <Sparkles className="text-rose-500 h-8 w-8 sm:h-12 sm:w-12 md:h-16 md:w-12" />
@ -242,19 +242,19 @@ export function HeroSection({ totalIcons, stars }: { totalIcons: number; stars:
transition={{ transition={{
duration: 0.5, duration: 0.5,
delay: 0.3, delay: 0.3,
ease: "easeOut" ease: "easeOut",
}} }}
> >
<motion.div <motion.div
animate={{ animate={{
y: [0, -3, 0], y: [0, -3, 0],
rotate: [0, -5, 0] rotate: [0, -5, 0],
}} }}
transition={{ transition={{
duration: 4, duration: 4,
repeat: Infinity, repeat: Number.POSITIVE_INFINITY,
repeatType: "reverse", repeatType: "reverse",
ease: "easeInOut" ease: "easeInOut",
}} }}
> >
<Sparkles className="text-rose-500 h-5 w-5 sm:h-8 sm:w-8 md:h-12 md:w-12" /> <Sparkles className="text-rose-500 h-5 w-5 sm:h-8 sm:w-8 md:h-12 md:w-12" />

View File

@ -9,7 +9,7 @@ import { BASE_URL, REPO_PATH } from "@/constants"
import type { AuthorData, Icon, IconFile } from "@/types/icons" import type { AuthorData, Icon, IconFile } from "@/types/icons"
import confetti from "canvas-confetti" import confetti from "canvas-confetti"
import { motion } from "framer-motion" import { motion } from "framer-motion"
import { Check, Copy, Download, FileType, Github, Moon, PaletteIcon, Sun, ArrowRight } from "lucide-react" import { ArrowRight, Check, Copy, Download, FileType, Github, Moon, PaletteIcon, Sun } from "lucide-react"
import Image from "next/image" import Image from "next/image"
import Link from "next/link" import Link from "next/link"
import { useCallback, useState } from "react" import { useCallback, useState } from "react"
@ -238,12 +238,7 @@ export function IconDetails({ icon, iconData, authorData, allIcons }: IconDetail
<Tooltip> <Tooltip>
<TooltipTrigger asChild> <TooltipTrigger asChild>
<Button <Button variant="outline" size="icon" className="h-8 w-8 rounded-lg" asChild>
variant="outline"
size="icon"
className="h-8 w-8 rounded-lg"
asChild
>
<Link <Link
href={githubUrl} href={githubUrl}
target="_blank" target="_blank"
@ -363,14 +358,16 @@ export function IconDetails({ icon, iconData, authorData, allIcons }: IconDetail
<h3 className="text-sm font-semibold text-muted-foreground mb-2">About this icon</h3> <h3 className="text-sm font-semibold text-muted-foreground mb-2">About this icon</h3>
<div className="text-xs text-muted-foreground space-y-2"> <div className="text-xs text-muted-foreground space-y-2">
<p> <p>
Available in {availableFormats.length > 1 Available in{" "}
{availableFormats.length > 1
? `${availableFormats.length} formats (${availableFormats.map((f) => f.toUpperCase()).join(", ")}) ` ? `${availableFormats.length} formats (${availableFormats.map((f) => f.toUpperCase()).join(", ")}) `
: `${availableFormats[0].toUpperCase()} format `} : `${availableFormats[0].toUpperCase()} format `}
with a base format of {iconData.base.toUpperCase()}. with a base format of {iconData.base.toUpperCase()}.
{iconData.colors && " Includes both light and dark theme variants for better integration with different UI designs."} {iconData.colors && " Includes both light and dark theme variants for better integration with different UI designs."}
</p> </p>
<p> <p>
Perfect for adding to dashboards, app directories, documentation, or anywhere you need the {icon.replace(/-/g, " ")} logo. Perfect for adding to dashboards, app directories, documentation, or anywhere you need the {icon.replace(/-/g, " ")}{" "}
logo.
</p> </p>
</div> </div>
</div> </div>
@ -476,7 +473,9 @@ export function IconDetails({ icon, iconData, authorData, allIcons }: IconDetail
</Card> </Card>
</div> </div>
</div> </div>
{iconData.categories && iconData.categories.length > 0 && (() => { {iconData.categories &&
iconData.categories.length > 0 &&
(() => {
const MAX_RELATED_ICONS = 16 const MAX_RELATED_ICONS = 16
const currentCategories = iconData.categories || [] const currentCategories = iconData.categories || []
@ -514,7 +513,11 @@ export function IconDetails({ icon, iconData, authorData, allIcons }: IconDetail
<IconsGrid filteredIcons={topRelatedIcons} matchedAliases={{}} /> <IconsGrid filteredIcons={topRelatedIcons} matchedAliases={{}} />
{relatedIconsWithScore.length > MAX_RELATED_ICONS && ( {relatedIconsWithScore.length > MAX_RELATED_ICONS && (
<div className="mt-6 text-center"> <div className="mt-6 text-center">
<Button asChild variant="link" className="text-muted-foreground hover:text-primary transition-colors duration-200 hover:no-underline"> <Button
asChild
variant="link"
className="text-muted-foreground hover:text-primary transition-colors duration-200 hover:no-underline"
>
<Link href={viewMoreUrl} className="no-underline"> <Link href={viewMoreUrl} className="no-underline">
View all related icons View all related icons
<ArrowRight className="ml-2 h-4 w-4" /> <ArrowRight className="ml-2 h-4 w-4" />

View File

@ -335,10 +335,12 @@ export function IconSearch({ icons }: IconSearchProps) {
Relevance Relevance
</DropdownMenuRadioItem> </DropdownMenuRadioItem>
<DropdownMenuRadioItem value="alphabetical-asc" className="cursor-pointer"> <DropdownMenuRadioItem value="alphabetical-asc" className="cursor-pointer">
<ArrowDownAZ className="h-4 w-4 mr-2" />Name (A-Z) <ArrowDownAZ className="h-4 w-4 mr-2" />
Name (A-Z)
</DropdownMenuRadioItem> </DropdownMenuRadioItem>
<DropdownMenuRadioItem value="alphabetical-desc" className="cursor-pointer"> <DropdownMenuRadioItem value="alphabetical-desc" className="cursor-pointer">
<ArrowUpZA className="h-4 w-4 mr-2" />Name (Z-A) <ArrowUpZA className="h-4 w-4 mr-2" />
Name (Z-A)
</DropdownMenuRadioItem> </DropdownMenuRadioItem>
<DropdownMenuRadioItem value="newest" className="cursor-pointer"> <DropdownMenuRadioItem value="newest" className="cursor-pointer">
<Calendar className="h-4 w-4 mr-2" /> <Calendar className="h-4 w-4 mr-2" />