{isLogin || isLoginView ? props.children : null}
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 (