From c55b28f1b8e0d083edd48e03d9bf355a7c890640 Mon Sep 17 00:00:00 2001 From: fede Date: Wed, 2 Apr 2025 21:47:16 -0300 Subject: [PATCH] fix: eliminado flashbang cambie las llamadas a window.location.reload() a router.reload() --- resources/js/Pages/Songs/Index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/js/Pages/Songs/Index.tsx b/resources/js/Pages/Songs/Index.tsx index ded25f6..6d8ef61 100644 --- a/resources/js/Pages/Songs/Index.tsx +++ b/resources/js/Pages/Songs/Index.tsx @@ -42,7 +42,8 @@ export default function Index({ songs }: { songs: Cancion[] }) { }) .then((response: { data: string }) => { console.log('Song added successfully', response.data); - window.location.reload(); + router.reload(); + setshowmodal(false); }) .catch(() => { setshowmodal(false); @@ -56,7 +57,7 @@ export default function Index({ songs }: { songs: Cancion[] }) { .then(() => { setcan({} as Cancion); setRemove(false); - window.location.reload(); + router.reload(); }) .catch((error) => { console.error('Error removing song:', error);