Skip to content

Commit

Permalink
fix(scheduled-publishing): export ScheduleBadge and ScheduleAction fr…
Browse files Browse the repository at this point in the history
…om core
  • Loading branch information
pedrobonamin committed Apr 23, 2024
1 parent af46637 commit 941ed39
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/sanity/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export * from './hooks'
export * from './i18n'
export * from './presence'
export * from './preview'
export * from './scheduledPublishing'
export * from './schema'
export type {SearchFactoryOptions, SearchOptions, SearchSort, SearchTerms} from './search'
export {createSearch, getSearchableTypes} from './search'
Expand Down
2 changes: 2 additions & 0 deletions packages/sanity/src/core/scheduledPublishing/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './plugin/documentActions/schedule/ScheduleAction'
export * from './plugin/documentBadges/scheduled/ScheduledBadge'
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ const debug = debugWithName('ScheduleAction')
* empty dependency arrays.
*/

/**
* @beta
*/
export const ScheduleAction = (props: DocumentActionProps): DocumentActionDescription | null => {
const {draft, id, liveEdit, onComplete, published, type} = props

const currentUser = useCurrentUser()
//
const [permissions, isPermissionsLoading] = useDocumentPairPermissions({
id,
type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import {debugWithName} from '../../../utils/debug'

const debug = debugWithName('ScheduledBadge')

/**
* @beta
*/
export const ScheduledBadge: DocumentBadgeComponent = (props) => {
// Poll for document schedules
const {schedules} = usePollSchedules({documentId: props.id, state: 'scheduled'})
Expand Down

0 comments on commit 941ed39

Please sign in to comment.