mirror of
https://github.com/usememos/memos.git
synced 2025-02-20 21:30:55 +01:00
fix: signin error notification is not shown (#2908)
fix signin error notification is not shown
This commit is contained in:
parent
82e72813f9
commit
b8a9783db5
@ -1,4 +1,5 @@
|
|||||||
import { Button, Checkbox, Divider, Input } from "@mui/joy";
|
import { Button, Checkbox, Divider, Input } from "@mui/joy";
|
||||||
|
import { ClientError } from "nice-grpc-web";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { toast } from "react-hot-toast";
|
import { toast } from "react-hot-toast";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
@ -85,7 +86,7 @@ const SignIn = () => {
|
|||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
toast.error(error.response.data.message || t("message.login-failed"));
|
toast.error((error as ClientError).details || t("message.login-failed"));
|
||||||
}
|
}
|
||||||
actionBtnLoadingState.setFinish();
|
actionBtnLoadingState.setFinish();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user