From c4bdb537493feeedad222cec6f020362a63ce8f5 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Tue, 6 May 2025 10:33:51 -0500 Subject: [PATCH] Allow edit groups if user is on a different screen. --- frontend/src/components/M3URefreshNotification.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/M3URefreshNotification.jsx b/frontend/src/components/M3URefreshNotification.jsx index 1fbdaaec..e669b444 100644 --- a/frontend/src/components/M3URefreshNotification.jsx +++ b/frontend/src/components/M3URefreshNotification.jsx @@ -8,6 +8,7 @@ import useChannelsStore from '../store/channels'; import useEPGsStore from '../store/epgs'; import { Stack, Button, Group } from '@mantine/core'; import API from '../api'; +import { useNavigate } from 'react-router-dom'; export default function M3URefreshNotification() { const playlists = usePlaylistsStore((s) => s.playlists); @@ -18,6 +19,7 @@ export default function M3URefreshNotification() { const fetchEPGData = useEPGsStore((s) => s.fetchEPGData); const [notificationStatus, setNotificationStatus] = useState({}); + const navigate = useNavigate(); const handleM3UUpdate = (data) => { if ( @@ -61,8 +63,12 @@ export default function M3URefreshNotification() { size="xs" variant="outline" onClick={() => { - // Open the M3U edit modal for this account + // Store the ID we want to edit in the store first usePlaylistsStore.getState().setEditPlaylistId(data.account); + + // Then navigate to the content sources page + // Using the exact path that matches your app's routing structure + navigate('/sources'); }} > Edit Groups