import React from 'react'

import { VmpNotPublish } from 'components/Empty'

// isPublish 传入发布校验，已发布可正常阅读，未发布仅内部员工可正常阅读
type ValidatePublishProps = {
  children: React.ReactNode
  isPublish: boolean
}
// 校验发布逻辑
const ValidatePublish: React.FC<ValidatePublishProps> = ({ children, isPublish }) => {
  return isPublish ? <>{children}</> : <VmpNotPublish />
}

export default ValidatePublish
