Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nec 1 search function #3

Open
wants to merge 5 commits into
base: development
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test(page)removed console logs
  • Loading branch information
nakiacallaway committed Apr 20, 2021
commit 1bceb5c95a79711727251b069f10acc8db779dbd
2 changes: 0 additions & 2 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@ const HomePage: React.FC = () => {
const [searchTerm, setSearchTerm] = useState<string>('');

useEffect(() => {
console.log('is this rendering');
const foundPoke = pokemonData.filter(pk => {
return pk.name.toLowerCase().includes(searchTerm.toLowerCase());
});
@@ -18,7 +17,6 @@ const HomePage: React.FC = () => {
// useEffect(()=>{},[])

const handleChange = (event: ChangeEvent<HTMLInputElement>) => {
console.log(event.target.value);
setSearchTerm(event.target.value);
};

2 changes: 0 additions & 2 deletions src/pages/SinglePokemon.tsx
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@ const SinglePokemonPage: React.FC = () => {
let foundPokemon = pokemonData.find(
pd => pd.name.toLowerCase() === pokemonName
);
console.log(foundPokemon);
setPokemon(updateEvolution(foundPokemon));
}, [pokemonName]);

@@ -45,7 +44,6 @@ const SinglePokemonPage: React.FC = () => {
});
}

console.log(poke);
return poke;
};
return (