import { Result } from 'antd' import { usingStorage } from '@/hooks/usingStorage' import useAuthStore from '@/stores/Auth' export default function RequireAuth({ children, ...props }) { const [isPermitted, currentUser] = useAuthStore(state => [state.isPermitted, state.currentUser]) const { userId } = usingStorage() if (isPermitted(props.subject)) { // if (props.subject === '/account/management1') { return children } else if (props.result) { return ( ) } }