feat: fix likes
This commit is contained in:
@@ -29,7 +29,7 @@ const Playback = ({ route, navigation }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Page headerType="NONE" backgroundImg={isWeb ? background.playbackWeb : background.playbackMobile}>
|
<Page headerType="NONE" backgroundImg={isWeb ? background.playbackWeb : background.playbackMobile}>
|
||||||
<Image source={ai.theo} style={styles.img} resizeMode="contain" />
|
{/* <Image source={ai.theo} style={styles.img} resizeMode="contain" /> */}
|
||||||
<MusicLandHeader
|
<MusicLandHeader
|
||||||
onPressBack={() => navigation.navigate(Routes.Home)}
|
onPressBack={() => navigation.navigate(Routes.Home)}
|
||||||
progress={25}
|
progress={25}
|
||||||
|
|||||||
@@ -83,13 +83,6 @@ export const toggleProjectLike = async ({
|
|||||||
: {}),
|
: {}),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const cleanupPayload =
|
|
||||||
target === LIKE_TARGET.PLAYBACK
|
|
||||||
? {
|
|
||||||
// Remove any malformed top-level "likes.playback" key if it exists
|
|
||||||
["likes.playback"]: deleteField(),
|
|
||||||
}
|
|
||||||
: {};
|
|
||||||
await projectsRef.doc(projectId).set(
|
await projectsRef.doc(projectId).set(
|
||||||
{
|
{
|
||||||
...(target === LIKE_TARGET.SONG
|
...(target === LIKE_TARGET.SONG
|
||||||
@@ -99,7 +92,6 @@ export const toggleProjectLike = async ({
|
|||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
...likesPayload,
|
...likesPayload,
|
||||||
...cleanupPayload,
|
|
||||||
},
|
},
|
||||||
{ merge: true }
|
{ merge: true }
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user