Prevent invalid api call (#9757)
This commit is contained in:
@@ -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");
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user