Prevent invalid api call (#9757)

This commit is contained in:
Afzal Sayed authored and GitHub committed 2023-06-23 22:48:38 +02:00
1 parent 0adde17f38
commit 86ba0766fc
1 file changed
+1
@@ -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");
},