diff --git a/packages/core/client/src/route-switch/demos/demo1.tsx b/packages/core/client/src/route-switch/demos/demo1.tsx
index 66b3e08ad..15dd6cb71 100644
--- a/packages/core/client/src/route-switch/demos/demo1.tsx
+++ b/packages/core/client/src/route-switch/demos/demo1.tsx
@@ -1,9 +1,18 @@
+import { RouteRedirectProps, RouteSwitch, RouteSwitchProvider } from '@nocobase/client';
import React from 'react';
import { Link, MemoryRouter as Router } from 'react-router-dom';
-import { RouteRedirectProps, RouteSwitchProvider, RouteSwitch } from '@nocobase/client';
const Home = () =>
Home
;
const About = () => About
;
+const SignIn = () => Sign In
;
+const SignUp = () => Sign Up
;
+
+const AuthLayout = (props) => (
+
+
AuthLayout
+ {props.children}
+
+);
const routes: RouteRedirectProps[] = [
{
@@ -17,13 +26,42 @@ const routes: RouteRedirectProps[] = [
path: '/about',
component: 'About',
},
+ {
+ type: 'route',
+ component: 'AuthLayout',
+ routes: [
+ {
+ type: 'route',
+ path: '/signin',
+ component: 'SignIn',
+ },
+ {
+ type: 'route',
+ path: '/signup',
+ component: 'SignUp',
+ },
+ ],
+ },
];
export default () => {
return (
-
+
- Home, About
+
+ -
+ Home
+
+ -
+ About
+
+ -
+ Sign In
+
+ -
+ Sign Up
+
+