rename async execute

Signed-off-by: Stephen Glass <stephen@stephen.glass>
This commit is contained in:
Stephen Glass
2024-07-28 14:15:08 -04:00
parent e1caa7bc85
commit 40064678e0
2 changed files with 4 additions and 4 deletions
@@ -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(