Skip to content

Commit f4de75a

Browse files
committed
Enhance ProfilesDetails and AddonsDetails components with improved layout and dynamic logo display; update Drawer size and fix valueType casing in Addons page
1 parent 8edcdba commit f4de75a

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

src/components/ProfilesDetails/ProfilesDetails.tsx

+13-10
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const ProfilesDetails = ({ data, isOpen, onOpenChange }: ProfilesDetailsProps) =
6161
}, [data])
6262

6363
return (
64-
<Drawer isOpen={isOpen} onOpenChange={onOpenChange} size="full">
64+
<Drawer isOpen={isOpen} onOpenChange={onOpenChange} size="5xl">
6565
<DrawerContent>
6666
{(onClose) => (
6767
<>
@@ -72,7 +72,7 @@ const ProfilesDetails = ({ data, isOpen, onOpenChange }: ProfilesDetailsProps) =
7272
alt={data.author}
7373
height={60}
7474
radius="sm"
75-
src="/logo.png"
75+
src={data.avatar_pr_author}
7676
width={60}
7777
className="object-cover"
7878
/>
@@ -134,21 +134,24 @@ const ProfilesDetails = ({ data, isOpen, onOpenChange }: ProfilesDetailsProps) =
134134
</div>
135135
</div>
136136
<Divider className="my-2" />
137-
<div className="flex items-center justify-between">
138-
<p className=" text-white/60">95.1k Downloads - 141.9k views</p>
139-
<p className="text-sm text-gray-500">Last updated:</p>
140-
<p className="text-sm text-gray-500">version: </p>
141-
</div>
142-
<Divider className="my-2" />
143137
<h2 className="text-lg font-extrabold">Description</h2>
144-
<article className="markdown-body p-1 !bg-transparent">
138+
<article className="markdown-body p-1 !bg-transparent">
139+
<div className="flex justify-center">
140+
<Image
141+
isBlurred
142+
src={data.logo}
143+
alt={data.title}
144+
className="animate-levitate aspect-video"
145+
/>
146+
</div>
147+
145148
{isLoading ? (
146149
<Spinner className="items-center justify-center" />
147150
) : (
148151
<ReactMarkdown
149152
remarkPlugins={[remarkGfm]}
150153
rehypePlugins={[rehypeRaw]}
151-
className="text-default-900 gap-4 w-auto p-4 mx-auto flex-col lg:flex-row rounded-md"
154+
className="text-default-900 gap-4 w-auto p-4 mx-auto flex-col lg:flex-row rounded-md dark:prose-invert prose"
152155
>
153156
{markdownContent || 'No content available.'}
154157
</ReactMarkdown>

src/pages/Addons/Addons.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const Addon = () => {
5454
<SelectVersion
5555
version={version}
5656
setVersion={setVersion}
57-
valueType={['LichKing', 'Cataclysm', 'Pandaria', 'Vanilla', 'TBC']}
57+
valueType={['Lichking', 'Cataclysm', 'Pandaria', 'Vanilla', 'TBC']}
5858
/>
5959
<Divider orientation="vertical" className="h-auto" />
6060

src/pages/Addons/AddonsDetails.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ const AddonsDetails = ({ addon, isOpen, onOpenChange }: AddonsDetailsProps) => {
149149
<Divider className="my-2" />
150150
<h1 className="text-lg font-extrabold">Description</h1>
151151
<article className="markdown-body p-1 !bg-transparent">
152+
<div className="flex justify-center">
153+
<Image
154+
isBlurred
155+
src={addon.logo}
156+
alt={addon.title}
157+
className="animate-levitate aspect-video"
158+
/>
159+
</div>
152160
{isLoading ? (
153161
<Spinner className="items-center justify-center" />
154162
) : (

0 commit comments

Comments
 (0)