Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #194 from parodos-dev/dl/global-fetch-singin
Browse files Browse the repository at this point in the history
Using fetch from backstage API causes race condition on sing in process
  • Loading branch information
wKich committed Jul 21, 2023
2 parents 864665a + b8d55fd commit 188fc2c
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
configApiRef,
errorApiRef,
fetchApiRef,
useApi,
type SignInPageProps,
} from '@backstage/core-plugin-api';
Expand Down Expand Up @@ -60,7 +59,6 @@ export function SignInPage({ onSignInSuccess }: ParodosSignInPageProps) {
const styles = useStyles();
const errorApi = useApi(errorApiRef);
const configApi = useApi(configApiRef);
const { fetch } = useApi(fetchApiRef);
const baseUrl = configApi.getString('backend.baseUrl');
const [checkingToken, setTokenCheck] = useState(true);

Expand Down Expand Up @@ -92,7 +90,7 @@ export function SignInPage({ onSignInSuccess }: ParodosSignInPageProps) {
},
});
},
[baseUrl, fetch],
[baseUrl],
);

const submitHandler = useCallback(
Expand Down

0 comments on commit 188fc2c

Please sign in to comment.