import useCollectionSlice from "@/store/collection"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faChevronRight } from "@fortawesome/free-solid-svg-icons"; export default function Collections() { const { collections } = useCollectionSlice(); return (
{collections.map((e, i) => { const formattedDate = new Date(e.createdAt).toLocaleString("en-US", { year: "numeric", month: "short", day: "numeric", }); return (

{e.name}

{formattedDate}

); })}
); }