File tree 3 files changed +17
-59
lines changed
3 files changed +17
-59
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ import {
13
13
useCurrentRound ,
14
14
useCurrentScores ,
15
15
useCurrentTeams ,
16
+ useLoadedData ,
16
17
} from "./replicants"
17
- import { AnimatePresence , LayoutGroup , motion } from "framer-motion"
18
- import { maps } from "./utils"
18
+ import { AnimatePresence , motion } from "framer-motion"
19
19
import { forwardRef , useEffect , useState } from "react"
20
20
21
21
const animateContainer = {
@@ -72,6 +72,7 @@ const Main = () => {
72
72
const scores = useCurrentScores ( )
73
73
const mapWinners = useCurrentMapWinners ( )
74
74
const data = useLeaderboard ( )
75
+ const { maps } = useLoadedData ( )
75
76
76
77
return (
77
78
< div className = "absolute inset-0 text-white flex flex-col items-center justify-evenly z-10" >
@@ -126,12 +127,12 @@ const Main = () => {
126
127
} }
127
128
className = "absolute inset-0 rounded-lg bg-cover bg-center"
128
129
style = { {
129
- backgroundImage : `url('https://sendou.ink/static-assets/img/stages/${ maps . indexOf (
130
- game . map
131
- ) } .png')`,
130
+ backgroundImage : `url('https://sendou.ink/static-assets/img/stages/${
131
+ maps . indexOf ( game . map ) - 1
132
+ } .png')`,
132
133
} }
133
134
/>
134
- { maps . indexOf ( game . map ) === - 1 && (
135
+ { maps . indexOf ( game . map ) - 1 < 0 && (
135
136
< span className = "text-9xl font-bold" > ?</ span >
136
137
) }
137
138
{ mapWinners ?. [ i ] && (
Original file line number Diff line number Diff line change @@ -67,6 +67,16 @@ export const useCurrentTeams = () =>
67
67
} ,
68
68
] )
69
69
70
+ export const useLoadedData = ( ) =>
71
+ useReplicant ( "cq-dashboard.loadedData" , {
72
+ rounds : { } ,
73
+ teams : { } ,
74
+ blocks : { } ,
75
+ colors : [ ] ,
76
+ maps : [ ] ,
77
+ modes : [ ] ,
78
+ } )
79
+
70
80
export const useLastFmData = ( ) =>
71
81
useReplicant ( "cq-dashboard.lastFmData" , {
72
82
enabled : false ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments