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>
  )
}