Prevent invalid api call (#9757)
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");
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue