Skip to content

Commit

Permalink
Add state to the top
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikzogg committed Mar 18, 2024
1 parent a402d96 commit 0449e18
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/component/page/pet/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const querySchema = z.object({
const List: FC = () => {
const navigate = useNavigate();
const location = useLocation();
const query = useMemo(() => querySchema.parse(qs.parse(location.search.substring(1))), [location]);

const {
modelList: petList,
Expand All @@ -40,8 +41,6 @@ const List: FC = () => {
deleteClient,
});

const query = useMemo(() => querySchema.parse(qs.parse(location.search.substring(1))), [location]);

const petListRequest: PetListRequest = useMemo(
() => ({
offset: query.page * limit - limit,
Expand Down

0 comments on commit 0449e18

Please sign in to comment.