77} from 'src/lib/analytics'
88
99import { PlayType } from 'src/types'
10- import { getGlobalStats , getActiveUserCount } from 'src/api'
10+ import { getGlobalStats } from 'src/api'
1111import { AuthContext , ModalContext } from 'src/contexts'
1212import { AnimatedNumber } from 'src/components/Common/AnimatedNumber'
1313
@@ -112,7 +112,6 @@ export const HomeHero: React.FC<Props> = ({ scrollHandler }: Props) => {
112112 puzzle_games_total : number
113113 turing_games_total : number
114114 } > ( )
115- const [ activeUsers , setActiveUsers ] = useState < number > ( 0 )
116115 const { setPlaySetupModalProps } = useContext ( ModalContext )
117116 const { user, connectLichess } = useContext ( AuthContext )
118117
@@ -139,22 +138,6 @@ export const HomeHero: React.FC<Props> = ({ scrollHandler }: Props) => {
139138 return ( ) => clearInterval ( interval )
140139 } , [ ] )
141140
142- // Fetch active users count and set up periodic updates
143- useEffect ( ( ) => {
144- const fetchActiveUsers = async ( ) => {
145- const count = await getActiveUserCount ( )
146- setActiveUsers ( count )
147- }
148-
149- // Fetch immediately
150- fetchActiveUsers ( )
151-
152- // Update every 5 minutes
153- const interval = setInterval ( fetchActiveUsers , 5 * 60 * 1000 )
154-
155- return ( ) => clearInterval ( interval )
156- } , [ ] )
157-
158141 return (
159142 < Fragment >
160143 < BetaBlurb />
@@ -263,15 +246,6 @@ export const HomeHero: React.FC<Props> = ({ scrollHandler }: Props) => {
263246 </ div >
264247 </ div >
265248 < motion . div className = "flex flex-wrap justify-center gap-6 px-2" >
266- { activeUsers > 0 && (
267- < p className = "text-center text-base text-white/80" >
268- < AnimatedNumber
269- value = { activeUsers }
270- className = "font-bold text-white"
271- /> { ' ' }
272- recent users
273- </ p >
274- ) }
275249 < p className = "text-center text-base text-white/80" >
276250 < AnimatedNumber
277251 value = { globalStats ?. play_moves_total || 0 }
@@ -286,15 +260,13 @@ export const HomeHero: React.FC<Props> = ({ scrollHandler }: Props) => {
286260 /> { ' ' }
287261 puzzles solved
288262 </ p >
289- { activeUsers <= 0 && (
290- < p className = "text-center text-base text-white/80" >
291- < AnimatedNumber
292- value = { globalStats ?. turing_games_total || 0 }
293- className = "font-bold text-white"
294- /> { ' ' }
295- turing games played
296- </ p >
297- ) }
263+ < p className = "text-center text-base text-white/80" >
264+ < AnimatedNumber
265+ value = { globalStats ?. turing_games_total || 0 }
266+ className = "font-bold text-white"
267+ /> { ' ' }
268+ turing games played
269+ </ p >
298270 </ motion . div >
299271 </ div >
300272 </ Fragment >
0 commit comments