fix: eliminado flashbang
cambie las llamadas a window.location.reload() a router.reload()
This commit is contained in:
@@ -42,7 +42,8 @@ export default function Index({ songs }: { songs: Cancion[] }) {
|
|||||||
})
|
})
|
||||||
.then((response: { data: string }) => {
|
.then((response: { data: string }) => {
|
||||||
console.log('Song added successfully', response.data);
|
console.log('Song added successfully', response.data);
|
||||||
window.location.reload();
|
router.reload();
|
||||||
|
setshowmodal(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
setshowmodal(false);
|
setshowmodal(false);
|
||||||
@@ -56,7 +57,7 @@ export default function Index({ songs }: { songs: Cancion[] }) {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
setcan({} as Cancion);
|
setcan({} as Cancion);
|
||||||
setRemove(false);
|
setRemove(false);
|
||||||
window.location.reload();
|
router.reload();
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('Error removing song:', error);
|
console.error('Error removing song:', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user