import { useEffect } from 'react' ; import { useScript } from './useScript' ; param cdnUrl param options returns export function useLess ( cdnUrl , options ? ) { useEffect ( ( ) => { if ( ! window [ 'less' ] ) { window [ 'less' ] = options as any ; } } ) ; const status = useScript ( cdnUrl ) ; return status === 'ready' ? window [ 'less' ] : undefined ; }