@@ -25,7 +25,27 @@ function App() {
2525 }
2626
2727 return (
28- < div className = "m-0 pt-[5vh] flex flex-col justify-between h-screen text-center" >
28+ < div className = "text-center" >
29+ < p className = "text-xs my-2" > < span className = "font-bold italic" > Note:</ span > Type effectiveness multipliers may vary in other games outside the core series.</ p >
30+
31+ < form
32+ className = "flex flex-col justify-center mb-10"
33+ onSubmit = { ( e ) => {
34+ e . preventDefault ( ) ;
35+ searchPokemon ( ) ;
36+ } }
37+ >
38+
39+ < div className = "flex justify-center gap-3" >
40+ < input
41+ id = "pokemon-input"
42+ onChange = { ( e ) => setName ( e . currentTarget . value . toLowerCase ( ) ) }
43+ placeholder = "Enter a Pokémon name..."
44+ className = "cursor-pointer text-lg border-1 rounded-lg py-2 px-4 bg-[#0f0f0f98] focus:outline-none focus:ring-1 focus:ring-red-500"
45+ />
46+ < button type = "submit" className = "cursor-pointer text-lg border-1 rounded-lg py-2 px-4 bg-[#0f0f0f98] hover:ring-1 hover:ring-red-500" > Find</ button >
47+ </ div >
48+ </ form >
2949 < div >
3050 { pokemonData ? (
3151 < div >
@@ -38,7 +58,7 @@ function App() {
3858 < p className = "mt-2" >
3959 < strong > Type:</ strong > { pokemonData ?. types ?. map ( ( type : any ) => capitalize ( type . type . name ) ) . join ( ", " ) }
4060 </ p >
41- < div className = "mt-10" >
61+ < div >
4262 { pokemonData ?. weaknesses ? (
4363 [ '2x' , '0.5x' , '0x' ] . map ( ( multiplier ) => (
4464 < CollapsibleSection key = { multiplier } title = { `${ multiplier } ${ multiplier === '2x' ? 'Weaknesses' : multiplier === '0.5x' ? 'Resistances' : 'Immunities' } ` } >
@@ -67,24 +87,6 @@ function App() {
6787 </ div >
6888
6989 { error && < p className = "text-red-500" > { error } </ p > }
70-
71- < form
72- className = "flex flex-col justify-center gap-2 mt-2"
73- onSubmit = { ( e ) => {
74- e . preventDefault ( ) ;
75- searchPokemon ( ) ;
76- } }
77- >
78- < div className = "flex justify-center gap-2 mt-2" >
79- < input
80- id = "pokemon-input"
81- onChange = { ( e ) => setName ( e . currentTarget . value . toLowerCase ( ) ) }
82- placeholder = "Enter a Pokémon name..."
83- />
84- < button type = "submit" className = "cursor-pointer" > Find</ button >
85- </ div >
86- < p className = "text-xs italic" > Note: Type effectiveness multipliers may vary in other games outside the core series.</ p >
87- </ form >
8890 </ div >
8991 ) ;
9092}
0 commit comments