import Link from 'next/link'; import { useState, forwardRef } from 'react'; import date from 'date-and-time'; import Loader from '../Loader'; import './FunctionCard.css'; import { API_URL } from '../../utils/config'; const FunctionCard = forwardRef((props, ref) => { const [isLoading, setIsLoading] = useState(true); const handleLoad = () => { setIsLoading(false); } const isFormOrArticle = (props.type === 'form' || props.type === 'article'); return ( {/* FunctionCard a une hauteur pendant chargement */}
{props.description}
{props.categorie.name}
{date.format(new Date(props.createdAt), 'DD/MM/YYYY', true)}