+11
-7
apps/web/src/components/SongCover/InteractionBar/InteractionBar.tsx
+11
-7
apps/web/src/components/SongCover/InteractionBar/InteractionBar.tsx
···
1
import HeartOutline from "../../Icons/HeartOutline";
2
3
function InteractionBar() {
4
-
return (
5
-
<div className="absolute bottom-[-1px] left-0 h-[100px] w-full bg-[linear-gradient(rgba(22,24,35,0)_2.92%,rgba(22,24,35,0.5)_98.99%)] flex justify-start items-end p-[10px] rounded-b-[8px]">
6
-
<div className="h-[40px] w-full flex items-center">
7
-
<HeartOutline color="#fff" />
8
-
</div>
9
-
</div>
10
-
);
11
}
12
13
export default InteractionBar;
···
1
import HeartOutline from "../../Icons/HeartOutline";
2
+
import HeartFilled from "../../Icons/Heart";
3
4
function InteractionBar() {
5
+
return (
6
+
<div className="absolute bottom-[-1px] left-0 h-[100px] w-full bg-[linear-gradient(rgba(22,24,35,0)_2.92%,rgba(22,24,35,0.5)_98.99%)] flex justify-start items-end p-[10px] rounded-b-[8px]">
7
+
<div className="h-[40px] w-full flex items-center">
8
+
<span className="cursor-pointer" onClick={(e) => e.preventDefault()}>
9
+
{true && <HeartOutline color="#fff" />}
10
+
{false && <HeartFilled color="#fff" />}
11
+
</span>
12
+
</div>
13
+
</div>
14
+
);
15
}
16
17
export default InteractionBar;
apps/web/src/components/SongCover/InteractionBar/index.tsx
apps/web/src/components/SongCover/InteractionBar/index.tsx
This file has not been changed.
apps/web/src/components/SongCover/SongCover.tsx
apps/web/src/components/SongCover/SongCover.tsx
This patch was likely rebased, as context lines do not match.
+2
-2
apps/web/src/pages/home/feed/Feed.tsx
+2
-2
apps/web/src/pages/home/feed/Feed.tsx
···
76
}
77
console.log(">> WebSocket connection closed");
78
};
79
-
}, [queryClient]);
80
81
return (
82
<Container>
···
89
cover={song.cover}
90
artist={song.artist}
91
title={song.title}
92
-
withLikeButton
93
/>
94
</Link>
95
<div className="flex">
···
130
cover={song.cover}
131
artist={song.artist}
132
title={song.title}
133
/>
134
</Link>
135
<div className="flex">
···
76
}
77
console.log(">> WebSocket connection closed");
78
};
79
+
}, [queryClient, feedUri]);
80
81
return (
82
<Container>
···
89
cover={song.cover}
90
artist={song.artist}
91
title={song.title}
92
/>
93
</Link>
94
<div className="flex">
···
129
cover={song.cover}
130
artist={song.artist}
131
title={song.title}
132
+
withLikeButton
133
/>
134
</Link>
135
<div className="flex">
History
5 rounds
0 comments
tsiry-sandratraina.com
submitted
#4
4 commits
expand
collapse
feat: add InteractionBar component and integrate with SongCover for like functionality
work in progress
Add likes support to feed and SongCover
Update feed API types to include trackUri, likesCount and liked Show
like button and counts in InteractionBar and expose onLike handler Use
useLike in SongCover to call like/unlike and pass uri/liked/likesCount
Forward like state from Feed to SongCover
Prompt sign-in for likes and stop click propagation
Show SignInModal (with a `like` flag) when a user attempts to like
without a token. Add optimistic local state for liked and likesCount to
update UI immediately. Stop event propagation on the like button and
cover to prevent parent click handlers.
expand 0 comments
pull request successfully merged
tsiry-sandratraina.com
submitted
#3
expand 0 comments
tsiry-sandratraina.com
submitted
#2
1 commit
expand
collapse
feat: add InteractionBar component and integrate with SongCover for like functionality
expand 0 comments
tsiry-sandratraina.com
submitted
#1
1 commit
expand
collapse
feat: add InteractionBar component and integrate with SongCover for like functionality
expand 0 comments
tsiry-sandratraina.com
submitted
#0
1 commit
expand
collapse
feat: add InteractionBar component and integrate with SongCover for like functionality