Skip to content

Commit b98f2c2

Browse files
Redesigned post node
1 parent 50c3a8d commit b98f2c2

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

next.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ const nextConfig = {
1414
protocol: 'https',
1515
hostname: 'img.icons8.com',
1616
},
17+
{
18+
protocol: 'https',
19+
hostname: 'scontent-iad3-2.cdninstagram.com',
20+
},
1721
],
1822
},
1923
};

src/components/global/automations/post/node.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const PostNode = ({ id }: Props) => {
1515
return (
1616
data?.data &&
1717
data.data.posts.length > 0 && (
18-
<div className="w-10/12 lg:w-8/12 relative xl:w-4/12 p-5 rounded-xl flex flex-col bg-[#1D1D1D] gap-y-3">
18+
<div className="w-10/12 lg:w-8/12 relative xl:w-4/12 p-5 rounded-xl flex flex-col bg-[#F6F7F9] gap-y-3">
1919
<div className="absolute h-20 left-1/2 bottom-full flex flex-col items-center z-50">
2020
<span className="h-[9px] w-[9px] bg-black rounded-full" />
2121
<Separator
@@ -28,7 +28,7 @@ const PostNode = ({ id }: Props) => {
2828
<Warning />
2929
If they comment on...
3030
</div>
31-
<div className="bg-background-80 p-3 rounded-xl flex flex-col gap-y-2">
31+
<div className="bg-[#ededef] p-3 rounded-xl flex flex-col gap-y-2">
3232
<div className="flex gap-x-2 items-center">
3333
<InstagramBlue />
3434
<p className="font-bold text-lg">These posts</p>
@@ -39,7 +39,17 @@ const PostNode = ({ id }: Props) => {
3939
key={post.id}
4040
className="relative w-4/12 aspect-square rounded-lg cursor-pointer overflow-hidden"
4141
>
42-
<Image fill sizes="100vw" src={post.media} alt="post image" />
42+
{post.mediaType === "VIDEO" ? (
43+
<video
44+
className="w-full h-full object-cover"
45+
src={post.media}
46+
muted
47+
loop
48+
playsInline
49+
/>
50+
) : (
51+
<Image fill sizes="100vw" src={post.media} alt="post media" />
52+
)}
4353
</div>
4454
))}
4555
</div>

0 commit comments

Comments
 (0)