Skip to content
Permalink
Browse files
[fix] fix RequireInitialized route navigate error (#35)
fix RequireInitialized route navigate error
  • Loading branch information
colordove committed Apr 7, 2022
1 parent f934c10 commit f26a66484443f77f13d8d07486bcf00f07fd8d67
Showing 5 changed files with 6 additions and 4 deletions.
@@ -26,7 +26,7 @@ export function RequireInitialized({ children }: { children: JSX.Element }) {
// trying to go to when they were redirected. This allows us to send them
// along to that page after they initialize, which is a nicer user experience
// than dropping them off on the home page.
return <Navigate to="initialize" state={{ from: location }} replace />;
return <Navigate to="/initialize" state={{ from: location }} replace />;
}

return children;
@@ -146,7 +146,7 @@ export function Sidebar(props: any) {
<Link to={`/space`}>{t`Space List`}</Link>
</Menu.Item>
{isSuperAdmin && (
<Menu.Item id="aaaa" key="/settings" icon={<SettingOutlined />}>
<Menu.Item id="settings" key="/settings" icon={<SettingOutlined />}>
<Link to={`/settings`}>{t`Platform Settings`}</Link>
</Menu.Item>
)}
@@ -43,7 +43,7 @@ export function useAuth() {
localStorage.setItem('initialized', 'false');
setInitialized(false);
if (!pathname.includes('initialize')) {
navigate('initialize');
navigate('/initialize');
}
}
}
@@ -75,6 +75,9 @@ h1,h2,h3,h4,h5,h6 {
width: 64px !important;
}
.ant-layout-sider-trigger {
display: flex;
justify-content: center;
align-items: center;
color: white;
text-align: center;
padding: 12px 0;
@@ -24,7 +24,6 @@ import { InitializeAPI } from './initialize.api';
import styles from './initialize.less';

export function InitializeSetType() {
console.log('hello');
const [authType, setAuthType] = useState<AuthTypeEnum>(AuthTypeEnum.LOCAL);
const navigate = useNavigate();
async function handleSetAuthType() {

0 comments on commit f26a664

Please sign in to comment.