From 182d58698bed721cdfcc88f8f67cc7940ad84f2e Mon Sep 17 00:00:00 2001 From: Mnigos Date: Tue, 17 Sep 2024 10:57:04 +0200 Subject: [PATCH] refactor(profile/components/profile): change layout --- app/profile/[id]/@top/layout.tsx | 4 +++- app/profile/components/profile/profile-card.tsx | 17 ++++++----------- tests/snapshots/profile-card.spec.tsx.snap | 12 ++++++------ 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/app/profile/[id]/@top/layout.tsx b/app/profile/[id]/@top/layout.tsx index a65fdbd4..cb16a8e2 100644 --- a/app/profile/[id]/@top/layout.tsx +++ b/app/profile/[id]/@top/layout.tsx @@ -24,7 +24,9 @@ function ProfileTopGenresSubLayout({ }: ProfileTopGenresSubLayout.Props) { return ( <> - +
+ +
{genres} {artists} diff --git a/app/profile/components/profile/profile-card.tsx b/app/profile/components/profile/profile-card.tsx index 37548c7c..563afb5e 100644 --- a/app/profile/components/profile/profile-card.tsx +++ b/app/profile/components/profile/profile-card.tsx @@ -5,12 +5,7 @@ import { ShareButton } from './share-button' import type { Profile } from '@app/api/types' import { FollowersCount, SpotifyLink } from '@app/components/common' -import { - Card, - CardDescription, - CardHeader, - CardTitle, -} from '@app/components/ui/card' +import { CardDescription, CardTitle } from '@app/components/ui/card' import { findImage } from '@app/utils/find-image' namespace ProfileCard { @@ -29,9 +24,9 @@ function ProfileCard({ children, }: ProfileCard.Props) { return ( - - -
+
+
+
0 ? findImage(images, 128) : undefined} displayName={displayName} @@ -58,8 +53,8 @@ function ProfileCard({
{children} - - +
+
) } diff --git a/tests/snapshots/profile-card.spec.tsx.snap b/tests/snapshots/profile-card.spec.tsx.snap index 54bb8e3c..b254f6f0 100644 --- a/tests/snapshots/profile-card.spec.tsx.snap +++ b/tests/snapshots/profile-card.spec.tsx.snap @@ -6,13 +6,13 @@ exports[`ProfileCard > should match snapshot 1`] = ` "baseElement":
should match snapshot 1`] = ` , "container":