qwq
This commit is contained in:
@@ -32,7 +32,7 @@ export default function PasskeyLoginButton({ autoComplete, ...rest }: PasskeyLog
|
||||
window.PublicKeyCredential &&
|
||||
PublicKeyCredential.isConditionalMediationAvailable
|
||||
) {
|
||||
PublicKeyCredential.isConditionalMediationAvailable().then((v) => {
|
||||
PublicKeyCredential.isConditionalMediationAvailable().then(() => {
|
||||
if (!abortRef.current.signal.aborted) startLogin(true)();
|
||||
});
|
||||
}
|
||||
@@ -43,12 +43,7 @@ export default function PasskeyLoginButton({ autoComplete, ...rest }: PasskeyLog
|
||||
|
||||
const startLogin = (conditional: boolean) => async () => {
|
||||
if (!navigator.credentials || !window.PublicKeyCredential) {
|
||||
enqueueSnackbar({
|
||||
message: t("setting.browserNotSupported"),
|
||||
variant: "warning",
|
||||
action: DefaultCloseAction,
|
||||
});
|
||||
|
||||
enqueueSnackbar(t("setting.browserNotSupported"), { variant: "error", action: DefaultCloseAction });
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,12 +37,7 @@ const PasskeyList = (props: PasskeyProps) => {
|
||||
const [deleteLoading, setDeleteLoading] = useState(false);
|
||||
const addPasskey = async () => {
|
||||
if (!navigator.credentials || !window.PublicKeyCredential) {
|
||||
enqueueSnackbar({
|
||||
message: t("setting.browserNotSupported"),
|
||||
variant: "warning",
|
||||
action: DefaultCloseAction,
|
||||
});
|
||||
|
||||
dispatch(confirmOperation(t("setting.browserNotSupported")));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user