import { Meditation , meditations } from '../data/meditations' ; export const useMeditation = ( id ) : Meditation | undefined => { const arr = Object . values ( meditations ) . flat ( ) ; const meditation = arr . find ( ( m ) => m . id === id ) ; return meditation ; } ;