rename async execute
Signed-off-by: Stephen Glass <stephen@stephen.glass>
This commit is contained in:
@@ -157,7 +157,7 @@ export const SingleSignInPage = ({
|
||||
}
|
||||
};
|
||||
|
||||
const [_, { execute }] = useAsync(async () => {
|
||||
const [_, { execute: checkAuthErrors }] = useAsync(async () => {
|
||||
if (searchParams.get('error') !== 'false') {
|
||||
const errorResponse = await authErrorApi.getSignInAuthError();
|
||||
if (errorResponse) {
|
||||
@@ -167,7 +167,7 @@ export const SingleSignInPage = ({
|
||||
});
|
||||
|
||||
useMountEffect(() => {
|
||||
execute();
|
||||
checkAuthErrors();
|
||||
login({ checkExisting: true });
|
||||
});
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ export const useSignInProviders = (
|
||||
|
||||
const [searchParams, _setSearchParams] = useSearchParams();
|
||||
|
||||
const [_, { execute }] = useAsync(async () => {
|
||||
const [_, { execute: checkAuthErrors }] = useAsync(async () => {
|
||||
if (searchParams.get('error') !== 'false') {
|
||||
const errorResponse = await authErrorApi.getSignInAuthError();
|
||||
if (errorResponse) {
|
||||
@@ -103,7 +103,7 @@ export const useSignInProviders = (
|
||||
}
|
||||
});
|
||||
|
||||
useMountEffect(execute);
|
||||
useMountEffect(checkAuthErrors);
|
||||
|
||||
// This decorates the result with sign out logic from this hook
|
||||
const handleWrappedResult = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user