import React from "react"; import Image from "next/image"; import { useRouter } from "next/router"; import useResponsiveImageDimensions from "@/hooks/useResponsiveImageDimensions"; import { formatTimestampToHowLongAgo } from "@/utils/time"; import { useImageProxy } from "@/hooks/useImageProxy"; const CourseTemplate = (course) => { const router = useRouter(); const { returnImageProxy } = useImageProxy(); const { width, height } = useResponsiveImageDimensions(); return (
router.push(`/details/${course.id}`)} className="flex flex-col items-center mx-auto px-4 cursor-pointer mt-8 rounded-md shadow-lg">
resource thumbnail

{course.title}

{course.summary}

Published: {formatTimestampToHowLongAgo(course.published_at)}

); }; export default CourseTemplate;