You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import { useMemo } from 'react'
|
|
|
|
import sumBy from 'lodash/sumBy'
|
|
|
|
import type { Chapters } from '../types'
|
|
|
|
export const useDuration = (chapters: Chapters) => (
|
|
useMemo(() => sumBy(chapters, 'duration'), [chapters])
|
|
)
|
|
|