stargaze-studio/components/contracts/splits/ExecuteCombobox.hooks.ts

8 lines
295 B
TypeScript
Raw Normal View History

2023-03-19 06:56:41 +00:00
import type { ExecuteListItem } from 'contracts/splits/messages/execute'
import { useState } from 'react'
export const useExecuteComboboxState = () => {
const [value, setValue] = useState<ExecuteListItem | null>(null)
return { value, onChange: (item: ExecuteListItem) => setValue(item) }
}