File tree Expand file tree Collapse file tree
freebuff/web/src/app/live Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,12 +65,10 @@ function countryName(code: string): string {
6565}
6666
6767function formattedTime ( iso : string ) : string {
68- return new Intl . DateTimeFormat ( 'en-US' , {
68+ return new Intl . DateTimeFormat ( undefined , {
6969 hour : 'numeric' ,
7070 minute : '2-digit' ,
7171 second : '2-digit' ,
72- timeZone : 'UTC' ,
73- timeZoneName : 'short' ,
7472 } ) . format ( new Date ( iso ) )
7573}
7674
@@ -393,6 +391,7 @@ export default function LiveClient({
393391} : {
394392 initialStats : FreebuffLiveStats
395393} ) {
394+ const [ hasMounted , setHasMounted ] = useState ( false )
396395 const stats = useLiveStats ( initialStats )
397396 const topCountry = useMemo (
398397 ( ) =>
@@ -402,6 +401,10 @@ export default function LiveClient({
402401 [ stats . countries ] ,
403402 )
404403
404+ useEffect ( ( ) => {
405+ setHasMounted ( true )
406+ } , [ ] )
407+
405408 return (
406409 < main className = "min-h-screen bg-black text-white" >
407410 < section className = "relative overflow-hidden border-b border-white/10" >
@@ -430,9 +433,11 @@ export default function LiveClient({
430433 </ span >
431434 Freebuff live
432435 </ h1 >
433- < span className = "whitespace-nowrap text-sm text-white/45 md:text-base" >
434- Updated { formattedTime ( stats . generatedAt ) }
435- </ span >
436+ { hasMounted && (
437+ < span className = "whitespace-nowrap text-sm text-white/45 md:text-base" >
438+ Updated { formattedTime ( stats . generatedAt ) }
439+ </ span >
440+ ) }
436441 </ div >
437442 </ div >
438443 </ div >
You can’t perform that action at this time.
0 commit comments