登录页面处理error参数
This commit is contained in:
@@ -85,6 +85,14 @@ function LoginPageClient() {
|
|||||||
|
|
||||||
const { siteName } = useSite();
|
const { siteName } = useSite();
|
||||||
|
|
||||||
|
// 处理URL中的error参数
|
||||||
|
useEffect(() => {
|
||||||
|
const errorParam = searchParams.get('error');
|
||||||
|
if (errorParam) {
|
||||||
|
setError(decodeURIComponent(errorParam));
|
||||||
|
}
|
||||||
|
}, [searchParams]);
|
||||||
|
|
||||||
// 在客户端挂载后设置配置
|
// 在客户端挂载后设置配置
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
|
|||||||
Reference in New Issue
Block a user