@@ -10,9 +10,11 @@ import {
1010import { useTranslation } from 'react-i18next'
1111import { useQuery } from '@apollo/client'
1212
13- import Utility from '@services/Utility '
13+ import NameTT from '@components/popups/common/NameTT '
1414import { useStore , useStatic } from '@hooks/useStore'
15+ import Utility from '@services/Utility'
1516import Query from '@services/Query'
17+
1618import Header from '../general/Header'
1719import QuestTitle from '../general/QuestTitle'
1820
@@ -77,20 +79,28 @@ export default function Search({ safeSearch, toggleDialog, isMobile, Icons }) {
7779 } = option
7880 let main
7981 let amount = 0
82+ let tt = ''
8083 switch ( quest_reward_type ) {
8184 case 2 :
8285 main = Icons . getRewards ( quest_reward_type , quest_item_id , item_amount )
8386 amount = main . includes ( '_a' ) || item_amount <= 1 ? 0 : item_amount
87+ tt = `item_${ quest_item_id } `
8488 break
8589 case 3 :
90+ tt = `stardust`
8691 main = Icons . getRewards ( quest_reward_type , stardust_amount )
8792 amount = main . includes ( '_a' ) ? 0 : stardust_amount
8893 break
8994 case 4 :
95+ tt = `poke_${ candy_pokemon_id } `
9096 main = Icons . getRewards ( quest_reward_type , candy_pokemon_id )
9197 amount = main . includes ( '_a' ) ? 0 : candy_amount
9298 break
9399 case 7 :
100+ tt = [
101+ quest_form_id ? `form_${ quest_form_id } ` : '' ,
102+ `poke_${ quest_pokemon_id } ` ,
103+ ]
94104 main = Icons . getPokemon (
95105 quest_pokemon_id ,
96106 quest_form_id ,
@@ -101,10 +111,12 @@ export default function Search({ safeSearch, toggleDialog, isMobile, Icons }) {
101111 )
102112 break
103113 case 9 :
114+ tt = `poke_${ xl_candy_pokemon_id } `
104115 main = Icons . getRewards ( quest_reward_type , xl_candy_pokemon_id )
105116 amount = main . includes ( '_a' ) ? 0 : xl_candy_amount
106117 break
107118 case 12 :
119+ tt = `poke_${ mega_pokemon_id } `
108120 main = Icons . getRewards (
109121 quest_reward_type ,
110122 mega_pokemon_id ,
@@ -124,7 +136,13 @@ export default function Search({ safeSearch, toggleDialog, isMobile, Icons }) {
124136 position : 'relative' ,
125137 } }
126138 >
127- < img src = { main } style = { { maxWidth : 45 , maxHeight : 45 } } alt = { main } />
139+ < NameTT id = { tt } >
140+ < img
141+ src = { main }
142+ style = { { maxWidth : 45 , maxHeight : 45 } }
143+ alt = { main }
144+ />
145+ </ NameTT >
128146 { Boolean (
129147 main . includes ( 'stardust' )
130148 ? ! main . endsWith ( '0.png' )
@@ -141,25 +159,40 @@ export default function Search({ safeSearch, toggleDialog, isMobile, Icons }) {
141159 raid_pokemon_evolution,
142160 } = option
143161 return (
144- < img
145- src = { Icons . getPokemon (
146- raid_pokemon_id ,
147- raid_pokemon_form ,
148- raid_pokemon_evolution ,
149- raid_pokemon_gender ,
150- raid_pokemon_costume ,
151- ) }
152- alt = { raid_pokemon_id }
153- style = { { maxWidth : 45 , maxHeight : 45 } }
154- />
162+ < NameTT
163+ id = { [
164+ raid_pokemon_form ? `form_${ raid_pokemon_form } ` : '' ,
165+ raid_pokemon_evolution ? `evo_${ raid_pokemon_evolution } ` : '' ,
166+ `poke_${ raid_pokemon_id } ` ,
167+ ] }
168+ >
169+ < img
170+ src = { Icons . getPokemon (
171+ raid_pokemon_id ,
172+ raid_pokemon_form ,
173+ raid_pokemon_evolution ,
174+ raid_pokemon_gender ,
175+ raid_pokemon_costume ,
176+ ) }
177+ alt = { raid_pokemon_id }
178+ style = { { maxWidth : 45 , maxHeight : 45 } }
179+ />
180+ </ NameTT >
155181 )
156182 }
157183 return (
158- < img
159- src = { Icons . getPokemon ( nest_pokemon_id , nest_pokemon_form ) }
160- alt = { nest_pokemon_form }
161- style = { { maxWidth : 45 , maxHeight : 45 } }
162- />
184+ < NameTT
185+ id = { [
186+ nest_pokemon_form ? `form_${ nest_pokemon_form } ` : '' ,
187+ `poke_${ nest_pokemon_id } ` ,
188+ ] }
189+ >
190+ < img
191+ src = { Icons . getPokemon ( nest_pokemon_id , nest_pokemon_form ) }
192+ alt = { nest_pokemon_form }
193+ style = { { maxWidth : 45 , maxHeight : 45 } }
194+ />
195+ </ NameTT >
163196 )
164197 }
165198
0 commit comments