Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Board/GameBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export const GameBoard: React.FC<Props> = ({
<MoveClassificationIcon
classification={badge.classification}
size="small"
className="!ml-0 !h-3.5 !w-3.5 !text-[9px] pointer-events-none"
className="pointer-events-none !ml-0 !h-3.5 !w-3.5 !text-[9px]"
/>
</div>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/components/Common/PlaySetupModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ function OptionSelect<T>({
<button
key={index}
className={`flex-1 px-4 py-2 text-sm font-medium transition-colors ${
option === selected
? selectedClassName
: unselectedClassName
option === selected ? selectedClassName : unselectedClassName
} ${index === 0 ? 'rounded-l-lg' : ''} ${
index === options.length - 1 ? 'rounded-r-lg' : ''
}`}
Expand Down
8 changes: 4 additions & 4 deletions src/components/Home/HomeHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ export const HomeHero: React.FC<Props> = ({ scrollHandler }: Props) => {
// Fetch immediately
fetchGlobalStats()

// Update every 20 seconds
const interval = setInterval(fetchGlobalStats, 20000)
// Update every 5 minutes
const interval = setInterval(fetchGlobalStats, 5 * 60 * 1000)

return () => clearInterval(interval)
}, [])
Expand All @@ -149,8 +149,8 @@ export const HomeHero: React.FC<Props> = ({ scrollHandler }: Props) => {
// Fetch immediately
fetchActiveUsers()

// Update every 20 seconds
const interval = setInterval(fetchActiveUsers, 20000)
// Update every 5 minutes
const interval = setInterval(fetchActiveUsers, 5 * 60 * 1000)

return () => clearInterval(interval)
}, [])
Expand Down
6 changes: 1 addition & 5 deletions src/hooks/useAnalysisController/useAnalysisController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,7 @@ export const useAnalysisController = (
square: topHumanMove.slice(2, 4),
classification,
}
}, [
controller.currentNode,
moveEvaluation,
currentMaiaModel,
])
}, [controller.currentNode, moveEvaluation, currentMaiaModel])

return {
gameTree: controller.tree,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/active-users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type Data = {

// In-memory cache
let cachedUsers: { value: number; timestamp: number } | null = null
const CACHE_DURATION = 60 * 1000 // 1 minute
const CACHE_DURATION = 5 * 60 * 1000 // 5 minutes

/**
* API endpoint to get active user count from PostHog
Expand Down
6 changes: 0 additions & 6 deletions src/pages/turing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,4 @@ const Turing: React.FC<Props> = (props: Props) => {
)
}

export const getServerSideProps = async () => {
return {
props: {},
}
}

export default TuringPage
Loading