Skip to content

Commit

Permalink
Add console logs for debugging stats page
Browse files Browse the repository at this point in the history
  • Loading branch information
samchuk-vlad committed Jun 11, 2024
1 parent 46a0468 commit f43523b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/components/modals/RewardPerDayModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ import { isWelcomeModalOpenStorage } from './WelcomeModal'
const progressModalStorage = {
getIsClosed: () => {
const today = dayjs.utc().startOf('day').unix()
console.log(today)
const closedTimestamp = localStorage.getItem('progress-modal-closed')
if (!closedTimestamp) return false
return today === Number(closedTimestamp)
},
close: () => {
const today = dayjs.utc().startOf('day').unix()
console.log(today)
localStorage.setItem('progress-modal-closed', String(today))
},
}
Expand Down
8 changes: 7 additions & 1 deletion src/modules/telegram/StatsPage/LeaderboardTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ function createObserver(

const LeaderboardTable = ({ period }: LeaderboardTableProps) => {
const myAddress = useMyMainAddress()

console.log('My main address', myAddress)
const { data: leaderboardDataResult, isLoading } =
leaderboardDataQueryByPeriod[period].useQuery(period)

Expand Down Expand Up @@ -122,8 +124,10 @@ const LeaderboardTable = ({ period }: LeaderboardTableProps) => {
[address, rank, reward]
)

console.log('CurrentUserRank', currentUserRank)

const dataItems = useMemo(
() => leaderboardDataResult || [],
() => (leaderboardDataResult as any[]) || [],
[leaderboardDataResult]
)

Expand Down Expand Up @@ -186,6 +190,8 @@ const LeaderboardTable = ({ period }: LeaderboardTableProps) => {
].filter(Boolean)
}, [currentUserRank, dataItems, isElementIntersecting, initIsIntersection])

console.log('Leaderboard data', data)

return (
<>
{data.length === 0 &&
Expand Down
4 changes: 4 additions & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export type AppCommonProps = {
}

export default function App(props: AppProps<AppCommonProps>) {
useEffect(() => {
import('eruda').then((eruda) => eruda.default.init())
})

return (
<SessionProvider
basePath={
Expand Down

0 comments on commit f43523b

Please sign in to comment.