diff --git a/pages/[username].tsx b/pages/[username].tsx index 945f2b7f..0f39a677 100644 --- a/pages/[username].tsx +++ b/pages/[username].tsx @@ -187,10 +187,8 @@ const ProfileRoute: React.FC = ({ // Fetch all raids on mount, then find the raid in the URL if present useEffect(() => { - api.endpoints.raids.getAll().then((response) => { - const raids = appState.raidGroups.flatMap((group) => group.raids) - setRaids(raids) - }) + const raids = appState.raidGroups.flatMap((group) => group.raids) + setRaids(raids) }, [setRaids]) // When the element, raid or recency filter changes, diff --git a/pages/new/index.tsx b/pages/new/index.tsx index df040d76..b0ecbc0e 100644 --- a/pages/new/index.tsx +++ b/pages/new/index.tsx @@ -109,7 +109,7 @@ const NewRoute: React.FC = ({ useEffect(() => { if (context && context.jobs && context.jobSkills) { - appState.raids = context.raidGroups + appState.raidGroups = context.raidGroups appState.jobs = context.jobs appState.jobSkills = context.jobSkills appState.weaponKeys = context.weaponKeys diff --git a/pages/saved.tsx b/pages/saved.tsx index 84a064ac..4e1d8cc6 100644 --- a/pages/saved.tsx +++ b/pages/saved.tsx @@ -190,10 +190,8 @@ const SavedRoute: React.FC = ({ // Fetch all raids on mount, then find the raid in the URL if present useEffect(() => { - api.endpoints.raids.getAll().then((response) => { - const raids = appState.raidGroups.flatMap((group) => group.raids) - setRaids(raids) - }) + const raids = appState.raidGroups.flatMap((group) => group.raids) + setRaids(raids) }, [setRaids]) // When the element, raid or recency filter changes,