You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- import { useModel } from 'umi';
- import AppHeader from '@/components/AppHeader';
- import { RouteProps } from 'react-router';
- import React from 'react';
- import styles from './indexLayout.less';
-
- export default function IndexLayout(props: RouteProps) {
- const { isLogin } = useModel('useAuthModel');
- const isLoginView = props.location
- return (
- <div className={styles.app}>
- <AppHeader className={styles.header} />
- <main className={styles.main}>
- {
- isLogin
- ? (
- <div className={styles.nav}>
-
- </div>
- )
- : null
- }
- <div className={styles.content}>
- {isLogin || isLoginView ? props.children : null}
- </div>
- </main>
- </div>
- )
- }
|