Sanity Library Reference Docs
    Preparing search index...
    • Hook that verifies the current projects belongs to the organization ID specified in the dashboard context.

      Parameters

      • disabled: boolean = false

        When true, disables verification and skips project verification API calls

      • OptionalprojectIds: string[]

      Returns null | string

      Error message if the project doesn't match the organization ID, or null if all match or verification isn't needed

      function OrgVerifier() {
      const error = useVerifyOrgProjects()

      if (error) {
      return <div className="error">{error}</div>
      }

      return <div>Organization projects verified!</div>
      }