/*
 * @Description: 权限控制
 * @Author: taosu
 * @Date: 2022-01-06 10:08:10
 * @LastEditTime: 2022-05-10 11:34:43
 * @LastEditors: Nian Yi
 */
import React from "react";
import { useAuth } from 'components/easyUse';

export default function AuthGeneric({authCode,children}:{authCode:string,children:React.ReactElement}) {
  const {checkAuth} = useAuth();

  if(!checkAuth(authCode)) return null;

  return children;
}
