feat: DEFAULT_AVATAR

This commit is contained in:
DIYgod 2023-06-30 16:49:30 +01:00
parent 3f5cf809b8
commit e06bc00bfd
No known key found for this signature in database
4 changed files with 14 additions and 7 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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() {
<span className="w-14 h-14 inline-block">
<Image
className="rounded-full"
src={
site.metadata?.content?.avatars?.[0] ||
"ipfs://bafkreiabgixxp63pg64moxnsydz7hewmpdkxxi3kdsa4oqv4pb6qvwnmxa"
}
src={site.metadata?.content?.avatars?.[0] || DEFAULT_AVATAR}
alt={site.handle}
width="56"
height="56"

View File

@ -27,3 +27,5 @@ export const MIRA_LINK =
process.env.NEXT_PUBLIC_MIRA_LINK || "https://mira.crossbell.io"
export const WALLET_CONNECT_V2_PROJECT_ID =
process.env.NEXT_PUBLIC_WALLET_CONNECT_V2_PROJECT_ID
export const DEFAULT_AVATAR =
"ipfs://bafkreiabgixxp63pg64moxnsydz7hewmpdkxxi3kdsa4oqv4pb6qvwnmxa"