import React from 'react'; import MinifyPostCard from '@/app/(pages)/blog/post/[id]/MinifyPostCard'; import Link from 'next/link'; import { FaCreativeCommons } from 'react-icons/fa6'; interface AdjacentPosts { prev: any; next: any; } type Props = { adjacent_posts: AdjacentPosts perm_link: string; author: string; author_link: string; first_update: string; last_update: string | null; cc: string | undefined; title: string; } const Footer = (props: Props) => { const { adjacent_posts, perm_link, author_link, author, first_update, last_update, title } = props; const prev_post = adjacent_posts.prev; const next_post = adjacent_posts.next; const link = perm_link; const post_date = new Date(first_update); const update_date: Date | undefined = last_update ? new Date(last_update) : undefined; const cc = props.cc ?? 'by-nc-sa'; return (

{ title }

{ link }

Author

{ author }

Posted on

{ post_date.toLocaleString('default', { month: `long`, day: `numeric`, year: `numeric` }) }

{ update_date &&

Updated on

{ update_date.toLocaleString('default', { month: `long`, day: `numeric`, year: `numeric` }) }

}

Published under

{ `CC ${ cc.toUpperCase() } 4.0` }

{ next_post && } { prev_post && }
); }; export default Footer;