sanity
Version:
Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches
23 lines (18 loc) • 524 B
text/typescript
import DialogScheduleEdit from '../components/dialogs/DialogScheduleEdit'
import {type Schedule} from '../types'
import {useDialogVisible} from './useDialogVisibile'
function useDialogScheduleEdit(schedule: Schedule) {
const {visible, show, hide} = useDialogVisible()
const dialogProps = {
onClose: hide,
schedule,
visible,
}
return {
DialogScheduleEdit: visible ? DialogScheduleEdit : null,
dialogProps,
dialogScheduleEditShow: show,
hide,
}
}
export default useDialogScheduleEdit