Minor UX update to identities

This commit is contained in:
Tuan Dang
2023-12-10 22:35:12 +07:00
parent 444ce9508d
commit 4f6adb50d1
3 changed files with 30 additions and 15 deletions
@@ -13,7 +13,7 @@ export const useGetIdentityUniversalAuth = (identityId: string) => {
return useQuery({
queryKey: identitiesKeys.getIdentityUniversalAuth(identityId),
queryFn: async () => {
if (identityId === "") return undefined;
if (identityId === "") throw new Error("Identity ID is required");
const { data: { identityUniversalAuth } } = await apiRequest.get<{ identityUniversalAuth: IdentityUniversalAuth }>(
`/api/v1/auth/universal-auth/identities/${identityId}`