@@ -38,24 +38,26 @@ const BaseStationTile = (station) => {
3838 ]
3939 } , basicEqualFn )
4040
41+ const { start_time, battle_end, end_time } = station
42+
4143 const timers = React . useMemo ( ( ) => {
4244 const now = Date . now ( ) / 1000
4345 const internalTimers = /** @type {number[] } */ ( [ ] )
4446 if ( showTimer ) {
45- const hasStart = Number . isFinite ( station . start_time )
46- const hasBattleEnd = Number . isFinite ( station . battle_end )
47- const hasEnd = Number . isFinite ( station . end_time )
47+ const hasStart = Number . isFinite ( start_time )
48+ const hasBattleEnd = Number . isFinite ( battle_end )
49+ const hasEnd = Number . isFinite ( end_time )
4850
49- if ( hasStart && station . start_time > now ) {
50- internalTimers . push ( station . start_time )
51- } else if ( hasBattleEnd && station . battle_end > now ) {
52- internalTimers . push ( station . battle_end )
53- } else if ( hasEnd && station . end_time > now ) {
54- internalTimers . push ( station . end_time )
51+ if ( hasStart && start_time > now ) {
52+ internalTimers . push ( start_time )
53+ } else if ( hasBattleEnd && battle_end > now ) {
54+ internalTimers . push ( battle_end )
55+ } else if ( hasEnd && end_time > now ) {
56+ internalTimers . push ( end_time )
5557 }
5658 }
5759 return internalTimers
58- } , [ showTimer ] )
60+ } , [ showTimer , start_time , battle_end , end_time ] )
5961
6062 useForcePopup ( station . id , markerRef )
6163 useMarkerTimer ( timers . length ? Math . min ( ...timers ) : null , markerRef , ( ) =>
0 commit comments