Prevent invalid api call (#9757)

pull/9770/head
Afzal Sayed 2023-06-24 00:48:38 +04:00 committed by GitHub
parent 0adde17f38
commit 86ba0766fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -79,6 +79,7 @@ const ProfileView = () => {
const { data: team, isLoading } = trpc.viewer.teams.get.useQuery( const { data: team, isLoading } = trpc.viewer.teams.get.useQuery(
{ teamId: Number(router.query.id) }, { teamId: Number(router.query.id) },
{ {
enabled: !!router.query.id,
onError: () => { onError: () => {
router.push("/settings"); router.push("/settings");
}, },