From e06bc00bfd158f29a8522f3d76b0db1e95f48e61 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Fri, 30 Jun 2023 16:49:30 +0100 Subject: [PATCH] feat: DEFAULT_AVATAR --- src/app/dashboard/[subdomain]/page-component.tsx | 10 ++++++++-- src/components/home/HomeSidebar.tsx | 3 ++- src/components/home/Showcase.tsx | 6 ++---- src/lib/env.ts | 2 ++ 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/app/dashboard/[subdomain]/page-component.tsx b/src/app/dashboard/[subdomain]/page-component.tsx index d3398340..5cef8a0b 100644 --- a/src/app/dashboard/[subdomain]/page-component.tsx +++ b/src/app/dashboard/[subdomain]/page-component.tsx @@ -7,7 +7,13 @@ import { DashboardMain } from "~/components/dashboard/DashboardMain" import { Image } from "~/components/ui/Image" import { UniLink } from "~/components/ui/UniLink" import { useDate } from "~/hooks/useDate" -import { CSB_SCAN, DISCORD_LINK, GITHUB_LINK, TWITTER_LINK } from "~/lib/env" +import { + CSB_SCAN, + DEFAULT_AVATAR, + DISCORD_LINK, + GITHUB_LINK, + TWITTER_LINK, +} from "~/lib/env" import { getSiteLink } from "~/lib/helpers" import { Trans, useTranslation } from "~/lib/i18n/client" import { cn } from "~/lib/utils" @@ -239,7 +245,7 @@ export default function SubdomainIndex() { className="rounded-full" src={ site.metadata.content?.avatars?.[0] || - "ipfs://bafkreiabgixxp63pg64moxnsydz7hewmpdkxxi3kdsa4oqv4pb6qvwnmxa" + DEFAULT_AVATAR } alt={site.handle} width="56" diff --git a/src/components/home/HomeSidebar.tsx b/src/components/home/HomeSidebar.tsx index 520f0645..ea63fafa 100644 --- a/src/components/home/HomeSidebar.tsx +++ b/src/components/home/HomeSidebar.tsx @@ -6,6 +6,7 @@ import { CharacterFloatCard } from "~/components/common/CharacterFloatCard" import { SearchInput } from "~/components/common/SearchInput" import { Image } from "~/components/ui/Image" import { UniLink } from "~/components/ui/UniLink" +import { DEFAULT_AVATAR } from "~/lib/env" import { getSiteLink } from "~/lib/helpers" import { useTranslation } from "~/lib/i18n/client" import { useGetShowcase } from "~/queries/home" @@ -82,7 +83,7 @@ export function HomeSidebar({ hideSearch }: { hideSearch?: boolean }) { className="rounded-full object-cover" src={ site?.metadata?.content?.avatars?.[0] || - "ipfs://bafkreiabgixxp63pg64moxnsydz7hewmpdkxxi3kdsa4oqv4pb6qvwnmxa" + DEFAULT_AVATAR } alt={site.handle} width="40" diff --git a/src/components/home/Showcase.tsx b/src/components/home/Showcase.tsx index 53e3b157..361f9d46 100644 --- a/src/components/home/Showcase.tsx +++ b/src/components/home/Showcase.tsx @@ -6,6 +6,7 @@ import { CharacterFloatCard } from "~/components/common/CharacterFloatCard" import { FollowAllButton } from "~/components/common/FollowAllButton" import { Image } from "~/components/ui/Image" import { UniLink } from "~/components/ui/UniLink" +import { DEFAULT_AVATAR } from "~/lib/env" import { getSiteLink } from "~/lib/helpers" import { useTranslation } from "~/lib/i18n/client" import { useGetShowcase } from "~/queries/home" @@ -52,10 +53,7 @@ export function ShowCase() {