diff --git a/frontend/src/components/GalleryCard.tsx b/frontend/src/components/GalleryCard.tsx index 48022970..7ce0df9c 100644 --- a/frontend/src/components/GalleryCard.tsx +++ b/frontend/src/components/GalleryCard.tsx @@ -5,6 +5,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faDownload, faStar } from "@fortawesome/free-solid-svg-icons"; import { Link } from "react-router"; import { GALLERY_TYPE_BADGES } from "@/components/gallery/GalleryListingPreview"; +import { userAvatarUrl } from "@/lib/discord-cdn"; interface GalleryCardProps { listing: GalleryListing; @@ -119,13 +120,11 @@ const GalleryCard: FC = ({ )} - {listing.submitted_user.avatar_url ? ( - - ) : null} + {listing.submitted_user.username} diff --git a/frontend/src/components/modals/GalleryPreviewModal.tsx b/frontend/src/components/modals/GalleryPreviewModal.tsx index 097960ee..0a0034c2 100644 --- a/frontend/src/components/modals/GalleryPreviewModal.tsx +++ b/frontend/src/components/modals/GalleryPreviewModal.tsx @@ -5,6 +5,7 @@ import GalleryListingPreview, { GALLERY_TYPE_BADGES, listingHasMarkdown, } from "@/components/gallery/GalleryListingPreview"; +import { userAvatarUrl } from "@/lib/discord-cdn"; import type { GallerySubmission } from "@/types"; type PreviewView = "rendered" | "raw"; @@ -108,13 +109,11 @@ const GalleryPreviewModal: FC = ({ listing, open, onCl - {listing.submitted_user.avatar_url && ( - - )} + {listing.submitted_user.username} diff --git a/frontend/src/pages/admin/gallery/_index.tsx b/frontend/src/pages/admin/gallery/_index.tsx index 6425b6e7..3c0239a0 100644 --- a/frontend/src/pages/admin/gallery/_index.tsx +++ b/frontend/src/pages/admin/gallery/_index.tsx @@ -1,5 +1,6 @@ import { useState, useEffect, useCallback, useId, useMemo, type FC } from "react"; import { apiClient } from "@/lib/api"; +import { userAvatarUrl } from "@/lib/discord-cdn"; import { toast } from "sonner"; import type { GallerySubmission } from "@/types"; import Button from "@/components/Button"; @@ -224,13 +225,14 @@ const AdminGalleryPage: FC = () => {
by - {submission.submitted_user.avatar_url && ( - - )} + {submission.submitted_user.username} · {date}
diff --git a/frontend/src/pages/gallery/view.tsx b/frontend/src/pages/gallery/view.tsx index b07b226b..3f97ef05 100644 --- a/frontend/src/pages/gallery/view.tsx +++ b/frontend/src/pages/gallery/view.tsx @@ -3,6 +3,7 @@ import { useParams, Link } from "react-router"; import { MainLayout } from "@/pages/layout/Main"; import Button from "@/components/Button"; import { apiClient } from "@/lib/api"; +import { userAvatarUrl } from "@/lib/discord-cdn"; import type { GalleryListing } from "@/types"; import GalleryImportModal from "@/components/modals/GalleryImportModal"; import GalleryImportTagModal from "@/components/modals/GalleryImportTagModal"; @@ -12,13 +13,7 @@ import GalleryListingPreview, { GALLERY_TYPE_BADGES, } from "@/components/gallery/GalleryListingPreview"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { - faArrowLeft, - faDownload, - faStar, - faClock, - faUser, -} from "@fortawesome/free-solid-svg-icons"; +import { faArrowLeft, faDownload, faStar, faClock } from "@fortawesome/free-solid-svg-icons"; function getImportButtonLabel(type: string): string { if (type === "tag") return "Import Tag"; @@ -131,15 +126,11 @@ const GalleryViewPage: FC = () => {
- {listing.submitted_user.avatar_url ? ( - - ) : ( -