Skip to content

Commit

Permalink
Merge pull request #8 from hackbg/feature/fix-my-predictions
Browse files Browse the repository at this point in the history
Fix My Predictions
  • Loading branch information
imollov authored Feb 12, 2024
2 parents 8e27812 + bbec5d6 commit df37aba
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 22 deletions.
2 changes: 0 additions & 2 deletions app/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ import LeagueSection from '@/components/league-section'
import GameCard from '@/components/game-card'
import { leaguesData, currentSeason } from '@/config/api'
import { Sport, Game } from '@/types'
import { setLeaguesIds } from '@/lib/server-context'

export default async function Home({
searchParams,
}: {
searchParams: { [key: string]: string | string[] | undefined }
}) {
const currentLeagues = await fetchCurrentLeagues(Sport.Rugby)
setLeaguesIds(currentLeagues.map((l) => l.id))
const data = await Promise.all(
currentLeagues.map(async (league) => {
let allGames: Game[] = await fetchCurrentGames(Sport.Rugby, league.id)
Expand Down
5 changes: 2 additions & 3 deletions app/src/components/bet-slip.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { fetchGames } from '@/lib/fetch-data'
import { fetchCurrentLeagues, fetchGames } from '@/lib/fetch-data'
import BetSlipList from '@/components/bet-slip-list'
import { currentSeason } from '@/config/api'
import { Sport } from '@/types'
import { getLeaguesIds } from '@/lib/server-context'

const BetSlip = async () => {
const leagueIds = getLeaguesIds()
const leagueIds = (await fetchCurrentLeagues(Sport.Rugby)).map((l) => l.id)
const games = (
await Promise.all(
leagueIds.map(async (leagueId) => {
Expand Down
17 changes: 0 additions & 17 deletions app/src/lib/server-context.ts

This file was deleted.

0 comments on commit df37aba

Please sign in to comment.