Move fetchChannelProfiles to initdata

This commit is contained in:
SergeantPanda 2025-05-13 16:52:21 -05:00
parent cbbb2a6d59
commit 0a222f27af
2 changed files with 1 additions and 6 deletions

View file

@ -238,7 +238,6 @@ const ChannelsTable = ({ }) => {
const selectedProfileChannels = useChannelsStore(
(s) => s.profiles[selectedProfileId]?.channels
);
const fetchChannelProfiles = useChannelsStore((state) => state.fetchChannelProfiles);
// store/settings
const env_mode = useSettingsStore((s) => s.environment.env_mode);
@ -567,11 +566,6 @@ const ChannelsTable = ({ }) => {
setPaginationString(`${startItem} to ${endItem} of ${totalCount}`);
}, [data]);
useEffect(() => {
// Fetch channel profiles when the component mounts
fetchChannelProfiles();
}, []);
const columns = useMemo(
() => [
{

View file

@ -39,6 +39,7 @@ const useAuthStore = create((set, get) => ({
await Promise.all([
useChannelsStore.getState().fetchChannels(),
useChannelsStore.getState().fetchChannelGroups(),
useChannelsStore.getState().fetchChannelProfiles(),
usePlaylistsStore.getState().fetchPlaylists(),
useEPGsStore.getState().fetchEPGs(),
useEPGsStore.getState().fetchEPGData(),