Skip to content

Commit

Permalink
fix(modify): modify
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtabBukhari committed Aug 15, 2024
1 parent 657e1b3 commit b7435ea
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/components/Stats/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ export const Stats = () => {
}

function handleStatClick(mediaType: string) {
return

fetchData(setBudget, setAbortRequests, '', { ...(mediaType ? { media_type: mediaType } : {}), skip_cache: 'true' })

setSelectedNode(null)
Expand Down Expand Up @@ -149,18 +151,12 @@ export const Stats = () => {
return null
}

const isTemporarilyDisabled = true

return (
<StatisticsContainer>
<StatisticsWrapper>
{StatsConfig.map(({ name, icon, key, mediaType, tooltip }) =>
stats[key as keyof TStats] !== '0' ? (
<Stat
key={name}
data-testid={mediaType}
onClick={!isTemporarilyDisabled ? () => handleStatClick(mediaType) : () => 'undefined'}
>
<Stat key={name} data-testid={mediaType} onClick={() => handleStatClick(mediaType)}>
<Tooltip content={tooltip} margin="13px">
<div className="icon">{icon}</div>
<div className="text">{stats[key as keyof TStats]}</div>
Expand Down

0 comments on commit b7435ea

Please sign in to comment.