Skip to content

Commit

Permalink
update pinned groups based off dev data
Browse files Browse the repository at this point in the history
  • Loading branch information
tudddorrr committed Oct 20, 2024
1 parent e742927 commit 1a20b78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/api/usePinnedGroups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import makeValidatedGetRequest from './makeValidatedGetRequest'
import { playerGroupSchema } from '../entities/playerGroup'
import { z } from 'zod'

export default function usePinnedGroups(activeGame: Game | null) {
export default function usePinnedGroups(activeGame: Game | null, includeDevData: boolean) {
const fetcher = async ([url]: [string]) => {
const res = await makeValidatedGetRequest(url, z.object({
groups: z.array(playerGroupSchema)
Expand All @@ -15,7 +15,7 @@ export default function usePinnedGroups(activeGame: Game | null) {
}

const { data, error, mutate } = useSWR(
activeGame ? [`games/${activeGame.id}/player-groups/pinned`] : null,
activeGame ? [`games/${activeGame.id}/player-groups/pinned`, includeDevData] : null,
fetcher
)

Expand Down
2 changes: 1 addition & 1 deletion src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function Dashboard() {
const { startDate, endDate } = useTimePeriod(timePeriod)
const { headlines, loading: headlinesLoading, error: headlinesError } = useHeadlines(activeGame, startDate, endDate, includeDevData)
const { stats, loading: statsLoading, error: statsError } = useStats(activeGame, includeDevData)
const { groups: pinnedGroups, loading: pinnedGroupsLoading, error: pinnedGroupsError } = usePinnedGroups(activeGame)
const { groups: pinnedGroups, loading: pinnedGroupsLoading, error: pinnedGroupsError } = usePinnedGroups(activeGame, includeDevData)

const intendedRouteChecked = useIntendedRoute()

Expand Down

0 comments on commit 1a20b78

Please sign in to comment.