import React from 'react'; import MinifyPostCard from '@/app/(pages)/blog/post/[id]/MinifyPostCard'; import Link from 'next/link'; import { FaCreativeCommons } from 'react-icons/fa6'; type Props = { // post: any post_id: string; adjacent_posts: any perm_link: string | undefined; author: string | undefined; author_link: string | undefined; first_update: string; last_update: string | undefined; cc: string | undefined; title: string; } const Footer = (props: Props) => { const { adjacent_posts, perm_link, post_id, first_update, last_update, title } = props; const prev_post = adjacent_posts.prev; const next_post = adjacent_posts.next; const link = perm_link ?? `https://lumither.com/blog/post/${ post_id }`; const author = props.author ?? 'Tao'; const author_link = props.author_link ?? '/about/me'; 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;