diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index d3528913..816af4d5 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -155,8 +155,8 @@ export function BetsList(props: { user: User }) { (c) => contractsMetrics[c.id].netPayout ) - const totalPnl = user.profitCached.allTime - const totalProfitPercent = (totalPnl / user.totalDeposits) * 100 + // const totalPnl = user.profitCached.allTime + // const totalProfitPercent = (totalPnl / user.totalDeposits) * 100 const investedProfitPercent = ((currentBetsValue - currentInvested) / (currentInvested + 0.1)) * 100 diff --git a/web/components/portfolio/portfolio-value-graph.tsx b/web/components/portfolio/portfolio-value-graph.tsx index 8ce9a8f0..f8622117 100644 --- a/web/components/portfolio/portfolio-value-graph.tsx +++ b/web/components/portfolio/portfolio-value-graph.tsx @@ -2,7 +2,7 @@ import { ResponsiveLine } from '@nivo/line' import { PortfolioMetrics } from 'common/user' import { formatMoney } from 'common/util/format' import dayjs from 'dayjs' -import { last, set } from 'lodash' +import { last } from 'lodash' import { memo } from 'react' import { useWindowSize } from 'web/hooks/use-window-size' import { Col } from '../layout/col' @@ -12,14 +12,12 @@ export const PortfolioValueGraph = memo(function PortfolioValueGraph(props: { mode: 'value' | 'profit' setGraphDisplayNumber: (arg0: number | string | null) => void height?: number - includeTime?: boolean }) { - const { portfolioHistory, height, includeTime, mode, setGraphDisplayNumber } = - props + const { portfolioHistory, height, mode, setGraphDisplayNumber } = props const { width } = useWindowSize() function getPoints(line: 'value' | 'posProfit' | 'negProfit') { - let points = portfolioHistory.map((p) => { + const points = portfolioHistory.map((p) => { const { timestamp, balance, investmentValue, totalDeposits } = p const value = balance + investmentValue @@ -63,7 +61,7 @@ export const PortfolioValueGraph = memo(function PortfolioValueGraph(props: { }, ] } - let firstPoints = data[0].data + const firstPoints = data[0].data const numYTickValues = 2 const endDate = last(data[0].data)?.x diff --git a/web/components/user-page.tsx b/web/components/user-page.tsx index 74f85e68..f56e9613 100644 --- a/web/components/user-page.tsx +++ b/web/components/user-page.tsx @@ -42,21 +42,12 @@ export function UserPage(props: { user: User }) { const router = useRouter() const currentUser = useUser() const isCurrentUser = user.id === currentUser?.id - const bannerUrl = user.bannerUrl ?? defaultBannerUrl(user.id) + // const bannerUrl = user.bannerUrl ?? defaultBannerUrl(user.id) const [showConfetti, setShowConfetti] = useState(false) - // const [showBettingStreakModal, setShowBettingStreakModal] = useState(false) - // const [showLoansModal, setShowLoansModal] = useState(false) const isMobile = useIsMobile() useEffect(() => { - const claimedMana = router.query['claimed-mana'] === 'yes' - // const showBettingStreak = router.query['show'] === 'betting-streak' - // setShowBettingStreakModal(showBettingStreak) - // setShowConfetti(claimedMana || showBettingStreak) - - // const showLoansModel = router.query['show'] === 'loans' - // setShowLoansModal(showLoansModel) - + // const claimedMana = router.query['claimed-mana'] === 'yes' const query = { ...router.query } if (query.claimedMana || query.show) { delete query['claimed-mana']