mirror of
https://github.com/logto-io/logto.git
synced 2025-03-24 22:41:28 -05:00
fix(console): user identities table should not always be loading when no data (#5086)
This commit is contained in:
parent
31e60811d7
commit
08489334dd
1 changed files with 3 additions and 3 deletions
|
@ -38,7 +38,9 @@ function UserSocialIdentities({ userId, identities, onDelete }: Props) {
|
|||
keyPrefix: 'admin_console',
|
||||
});
|
||||
|
||||
const { data, error, mutate } = useSWR<ConnectorResponse[], RequestError>('api/connectors');
|
||||
const { data, error, isLoading, mutate } = useSWR<ConnectorResponse[], RequestError>(
|
||||
'api/connectors'
|
||||
);
|
||||
|
||||
const [deletingConnector, setDeletingConnector] = useState<DisplayConnector>();
|
||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||
|
@ -51,8 +53,6 @@ function UserSocialIdentities({ userId, identities, onDelete }: Props) {
|
|||
return getConnectorGroups(data);
|
||||
}, [data]);
|
||||
|
||||
const isLoading = !connectorGroups && !error;
|
||||
|
||||
const handleDelete = async (target: string) => {
|
||||
if (isSubmitting) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue