@@ -20,14 +20,13 @@ import { useMemory } from '@store/useMemory'
20
20
import { useLayoutStore } from '@store/useLayoutStore'
21
21
import { setDeepStore , useStorage } from '@store/useStorage'
22
22
import { ErrorBoundary } from '@components/ErrorBoundary'
23
- import { Img , TextWithIcon } from '@components/Img'
23
+ import { Img } from '@components/Img'
24
24
import { Title } from '@components/popups/Title'
25
25
import { PowerUp } from '@components/popups/PowerUp'
26
26
import { GenderIcon } from '@components/popups/GenderIcon'
27
27
import { Navigation } from '@components/popups/Navigation'
28
28
import { Coords } from '@components/popups/Coords'
29
29
import { TimeStamp } from '@components/popups/TimeStamps'
30
- import { ExtraInfo } from '@components/popups/ExtraInfo'
31
30
import { useAnalytics } from '@hooks/useAnalytics'
32
31
import { getTimeUntil } from '@utils/getTimeUntil'
33
32
import { formatInterval } from '@utils/formatInterval'
@@ -191,7 +190,10 @@ function DefendersModal({ gym, onClose }) {
191
190
{ defenders . map ( ( def ) => {
192
191
const fullCP = def . cp_when_deployed
193
192
const currentCP = def . cp_now
194
- const percent = Math . max ( 0 , Math . min ( 1 , currentCP / fullCP ) )
193
+ const percent = Math . max (
194
+ 0 ,
195
+ Math . min ( 1 , ( currentCP / fullCP ) * 1.25 - 0.25 ) ,
196
+ )
195
197
196
198
return (
197
199
< div
@@ -947,55 +949,13 @@ const GymFooter = ({ lat, lon, hasRaid, gym, setShowDefenders }) => {
947
949
* @param {import('@rm/types').Gym } props
948
950
* @returns
949
951
*/
950
- const ExtraGymInfo = ( {
951
- last_modified_timestamp,
952
- lat,
953
- lon,
954
- updated,
955
- total_cp,
956
- guarding_pokemon_id,
957
- guarding_pokemon_display,
958
- } ) => {
959
- const { t, i18n } = useTranslation ( )
960
- const Icons = useMemory ( ( s ) => s . Icons )
961
- const gymValidDataLimit = useMemory ( ( s ) => s . gymValidDataLimit )
952
+ const ExtraGymInfo = ( { last_modified_timestamp, lat, lon, updated } ) => {
962
953
const enableGymPopupCoords = useStorage (
963
954
( s ) => s . userSettings . gyms . enableGymPopupCoords ,
964
955
)
965
956
966
- const numFormatter = new Intl . NumberFormat ( i18n . language )
967
- /** @type {Partial<import('@rm/types').PokemonDisplay> } */
968
- const gpd = guarding_pokemon_display || { }
969
-
970
957
return (
971
958
< Grid container alignItems = "center" justifyContent = "center" >
972
- { ! ! guarding_pokemon_id && updated > gymValidDataLimit && (
973
- < ExtraInfo title = "defender" >
974
- < TextWithIcon
975
- src = { Icons . getPokemonByDisplay ( guarding_pokemon_id , gpd ) }
976
- >
977
- { gpd . badge === 1 && (
978
- < >
979
- < Img
980
- src = { Icons . getMisc ( 'bestbuddy' ) }
981
- alt = { t ( 'best_buddy' ) }
982
- maxHeight = { 15 }
983
- maxWidth = { 15 }
984
- />
985
-
986
- </ >
987
- ) }
988
- { t ( `poke_${ guarding_pokemon_id } ` ) }
989
- </ TextWithIcon >
990
- </ ExtraInfo >
991
- ) }
992
- { ! ! total_cp && updated > gymValidDataLimit && (
993
- < ExtraInfo title = "total_cp" > { numFormatter . format ( total_cp ) } </ ExtraInfo >
994
- ) }
995
- < Divider
996
- flexItem
997
- style = { { width : '100%' , height : 2 , margin : '10px 0' } }
998
- />
999
959
< TimeStamp time = { updated } > last_seen</ TimeStamp >
1000
960
< TimeStamp time = { last_modified_timestamp } > last_modified</ TimeStamp >
1001
961
{ enableGymPopupCoords && (
0 commit comments