mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 05:57:53 +00:00
fix(auth): sign up page not found when entering with url directly (#4002)
This commit is contained in:
parent
0bb5d5f5ee
commit
f12952de1f
@ -3,11 +3,16 @@ import React from 'react';
|
||||
import { Outlet } from 'react-router-dom';
|
||||
import { useSystemSettings, PoweredBy, useRequest, useAPIClient } from '@nocobase/client';
|
||||
import { AuthenticatorsContext } from '../authenticator';
|
||||
import { Spin } from 'antd';
|
||||
|
||||
export function AuthLayout(props: any) {
|
||||
const { data } = useSystemSettings();
|
||||
const api = useAPIClient();
|
||||
const { data: authenticators = [], error } = useRequest(() =>
|
||||
const {
|
||||
data: authenticators = [],
|
||||
error,
|
||||
loading,
|
||||
} = useRequest(() =>
|
||||
api
|
||||
.resource('authenticators')
|
||||
.publicList()
|
||||
@ -16,6 +21,10 @@ export function AuthLayout(props: any) {
|
||||
}),
|
||||
);
|
||||
|
||||
if (loading) {
|
||||
return <Spin />;
|
||||
}
|
||||
|
||||
if (error) {
|
||||
throw error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user