release branch
Seto Elkahfi committed
Aug 2, 2024 at 23:54 UTC
844dbd1ced806bdbb8a0a980987051adf52d1c85
2 files changed
+12
-4
.github/workflows/deploy-backend-musik88-web.yml
+2
@@ -2,6 +2,8 @@
2
name: Deploy Backend Musik88 Web
3
on:
4
push:
5
+ branches:
6
+ - splitfire/release/musik88-web
7
workflow_dispatch:
8
9
env:
frontend/splitfire-desktop/app/split/_components/votes-view.tsx
+10
-4
@@ -40,6 +40,12 @@ export interface VoteState {
40
downVotes: SongProviderVote[];
41
}
42
43
+type VotePayload = {
44
+ songProviderId: string;
45
+ voteType: string;
46
+ accessToken: string;
47
+}
48
+
49
export default function UpDownVotesView({
50
songProviderId,
51
votes,
@@ -121,12 +127,12 @@ export default function UpDownVotesView({
127
128
setState(State.LOADING);
129
try {
124
- const payload = {
130
+ const payload: VotePayload = {
131
songProviderId,
126
- type,
132
+ voteType: type,
133
accessToken: user.accessToken,
134
};
129
- const response = await invoke<SongBridgeResponse>(TAURI_CONTENT_SONG_BRIDGE_VOTE, { payload });
135
+ const response = await invoke<SongBridgeResponse>(TAURI_CONTENT_SONG_BRIDGE_VOTE, payload);
136
log.debug(response.votes);
137
if (response.code === HTTPStatusCode.OK) {
138
setVoteState({
@@ -163,7 +169,7 @@ export default function UpDownVotesView({
169
170
if (state === State.LOADING) {
171
return (
166
- <div className="mb-3" style={{ minHeight: 250 }}>
172
+ <div className="flex justify-center max-h-full">
173
<Spinner animation="border" role="status">
174
<span className="visually-hidden">Loading...</span>
175
</Spinner>