Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
chore: remove default list of 10 characters (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahgm authored Dec 8, 2022
1 parent d35b49d commit fd64c8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/CharacterList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ export const useCharacterList = () => {
},
});

return { status, ...query, error, characters: data?.results || [] };
return { status, ...query, error, search, characters: data?.results || [] };
};

export const CharacterList = () => {
const { characters } = useCharacterList();
const { characters, search } = useCharacterList();

const [, setSelected] = useSelectedParam();

if (characters.length === 0) {
if (characters.length === 0 || search === '') {
return <Text>No character found.</Text>;
}

Expand Down

0 comments on commit fd64c8e

Please sign in to comment.