mirror of
https://github.com/walkxcode/dashboard-icons.git
synced 2025-11-19 10:07:29 +01:00
format code + change env
This commit is contained in:
@@ -7,14 +7,12 @@ import type { Icon } from "@/types/icons"
|
||||
|
||||
export function IconCard({ name, data: iconData, matchedAlias }: { name: string; data: Icon; matchedAlias?: string }) {
|
||||
const formatedIconName = formatIconName(name)
|
||||
|
||||
|
||||
const isCommunityIcon = iconData.base.startsWith("http")
|
||||
const imageUrl = isCommunityIcon
|
||||
? iconData.base
|
||||
: `${BASE_URL}/${iconData.base}/${iconData.colors?.light || name}.${iconData.base}`
|
||||
|
||||
const imageUrl = isCommunityIcon ? iconData.base : `${BASE_URL}/${iconData.base}/${iconData.colors?.light || name}.${iconData.base}`
|
||||
|
||||
const linkHref = isCommunityIcon ? `/community/${name}` : `/icons/${name}`
|
||||
|
||||
|
||||
return (
|
||||
<MagicCard className="rounded-md shadow-md">
|
||||
<Link prefetch={false} href={linkHref} className="group flex flex-col items-center p-3 sm:p-4 cursor-pointer">
|
||||
|
||||
Reference in New Issue
Block a user