mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-26 21:18:45 -06:00
add playlist alert on success
This commit is contained in:
@@ -11,6 +11,7 @@ import { trigger } from "react-native-haptic-feedback";
|
||||
import { queryClient } from "../../../constants/query-client";
|
||||
import { QueryKeys } from "../../../enums/query-keys";
|
||||
|
||||
import * as Burnt from "burnt";
|
||||
|
||||
export default function AddPlaylist({
|
||||
navigation
|
||||
@@ -22,8 +23,15 @@ export default function AddPlaylist({
|
||||
|
||||
const useAddPlaylist = useMutation({
|
||||
mutationFn: ({ name } : { name : string}) => createPlaylist(name),
|
||||
onSuccess: () => {
|
||||
trigger("notificationSuccess")
|
||||
onSuccess: (data, { name }) => {
|
||||
trigger("notificationSuccess");
|
||||
|
||||
Burnt.alert({
|
||||
title: `Playlist created`,
|
||||
message: `Created playlist ${name}`,
|
||||
preset: 'done'
|
||||
});
|
||||
|
||||
navigation.goBack();
|
||||
|
||||
// Refresh user playlists component on home screen
|
||||
|
||||
Reference in New Issue
Block a user