import { Result } from 'antd' import useAuthStore from '@/stores/Auth' export default function RequireAuth({ children, ...props }, ) { const isPermitted = useAuthStore((state) => state.isPermitted) if (isPermitted(props.subject)) { return children } else { return ( ) } }