Severian's picture
initial commit
a8b3f00
raw
history blame
389 Bytes
import { useMemo } from 'react'
import { getSelectedDatasetsMode } from './utils'
import type {
DataSet,
SelectedDatasetsMode,
} from '@/models/datasets'
export const useSelectedDatasetsMode = (datasets: DataSet[]) => {
const selectedDatasetsMode: SelectedDatasetsMode = useMemo(() => {
return getSelectedDatasetsMode(datasets)
}, [datasets])
return selectedDatasetsMode
}