Prevent invalid api call (#9757)

This commit is contained in:
Afzal Sayed
2023-06-23 22:48:38 +02:00
committed by GitHub
parent 0adde17f38
commit 86ba0766fc
@@ -79,6 +79,7 @@ const ProfileView = () => {
const { data: team, isLoading } = trpc.viewer.teams.get.useQuery(
{ teamId: Number(router.query.id) },
{
enabled: !!router.query.id,
onError: () => {
router.push("/settings");
},