¿usted me podría ayudar?
Cuando intento importar la etiqueta "isPast" de data-fns a react.tsx, muestra ese mensaje: import isPast Module '"data-fns"' no tiene miembro exportado 'isPast'.ts(2305) o 'isPast' está declarado pero su valor nunca se lee.
Entonces, ¡no sé lo que hago! soy principiante...
import { CheckCircle, Lock } from 'phosphor-react' import {isPast} from 'data-fns' //The error is over here! interface LessonProps { title: string; slug: string; availableAt: Date; type: 'Live' | 'class'; } export function Lesson(props: LessonProps) { const isLessonAvailable = isPast(props.availableAt); return( <a href="#"> <span className="text-gray-300"> {props.availableAt.toString()} </span> <div className="rounded border border-gray-500 margin top-2 p-4"> <header className="flex items-center justify-between"> {isLessonAvailable?( <span className="text-sn text-blue-500 font-medium flex items-center gap-2"> <CheckCircle size={20}/> Conteúdo liberado </span> ) : ( <span className="text-sn text-orange-500 font-medium flex items-center gap-2"> <Lock size={20}/> Em breve </span> )} <span className="text-xs rounded py-[0.125rem] px-2 text-white font bold border border-green-300"> {props.type == 'Live' ? 'AO VIVO' : 'AULA PRATICA'} </span> </header> <strong className="text-gray-200 mt-5 block"> {props.title} </strong> </div> </a> ) }Tienes un error tipográfico. Es date-fns . Asegúrate de tenerlo instalado también
npm i date-fnsÚltimo consejo: obtenga un buen linter, porque se quejaría de que no existe un módulo como data-fns