@@ -25,7 +25,7 @@ import { Integrations } from "@sentry/tracing";
25
25
import { ToastContainer } from "react-toastify" ;
26
26
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" ;
27
27
import { faSortDown , faSortUp } from "@fortawesome/free-solid-svg-icons" ;
28
- import { throttle } from "lodash" ;
28
+ import { isNumber , throttle } from "lodash" ;
29
29
import { getPageProps } from "../utils/utils" ;
30
30
import ErrorBoundary from "../utils/ErrorBoundary" ;
31
31
import GlobalAppContext from "../utils/GlobalAppContext" ;
@@ -117,10 +117,12 @@ function HomePage({ listenCount, artistCount }: HomePageProps) {
117
117
/>
118
118
< div className = "homepage-upper-grey-box" />
119
119
120
- < h1 className = "listen-container" >
121
- < NumberCounter count = { listenCount } />
122
- global listens.
123
- </ h1 >
120
+ { isNumber ( listenCount ) && listenCount > 0 && (
121
+ < h1 className = "listen-container" >
122
+ < NumberCounter count = { listenCount } />
123
+ global listens.
124
+ </ h1 >
125
+ ) }
124
126
< div className = "homepage-info" >
125
127
< h1 >
126
128
Listen together
@@ -202,12 +204,14 @@ function HomePage({ listenCount, artistCount }: HomePageProps) {
202
204
/>
203
205
< div className = "homepage-lower-grey-box" />
204
206
205
- < h1 className = "listen-container" >
206
- Dig deeper with
207
- < div id = "artist-count-container" >
208
- < NumberCounter count = { artistCount } /> artists.
209
- </ div >
210
- </ h1 >
207
+ { isNumber ( artistCount ) && artistCount > 0 && (
208
+ < h1 className = "listen-container" >
209
+ Dig deeper with
210
+ < div id = "artist-count-container" >
211
+ < NumberCounter count = { artistCount } /> artists.
212
+ </ div >
213
+ </ h1 >
214
+ ) }
211
215
< div className = "homepage-info" >
212
216
< h1 >
213
217
Connect your music
0 commit comments