Refactor state

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2023-07-15 13:10:16 +03:00
parent de44828434
commit bd1dcd6809
8 changed files with 42 additions and 21 deletions

View File

@@ -71,7 +71,7 @@ const Home = () => {
};
const [search, setSearch] = useState('');
const memes = useQuery<Meme>('Meme');
const memes = useQuery<Meme>(Meme.schema.name);
return (
<RootScrollView padded>

View File

@@ -60,7 +60,7 @@ const Tags = () => {
};
const [search, setSearch] = useState('');
const tags = useQuery<Tag>('Tag')
const tags = useQuery<Tag>(Tag.schema.name)
.filtered(`name CONTAINS[c] "${search}"`)
.sorted(tagSortQuery(sort), sortDirection === SORT_DIRECTION.ASCENDING);