Many improvements.

This commit is contained in:
Daniel
2023-03-06 00:33:20 +03:30
parent f3e104aafe
commit cff10fa9b6
19 changed files with 314 additions and 79 deletions
+9 -6
View File
@@ -1,6 +1,7 @@
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faChevronRight } from "@fortawesome/free-solid-svg-icons";
import { Collection } from "@prisma/client";
import Link from "next/link";
export default function ({ collection }: { collection: Collection }) {
const formattedDate = new Date(collection.createdAt).toLocaleString("en-US", {
@@ -10,12 +11,14 @@ export default function ({ collection }: { collection: Collection }) {
});
return (
<div className="p-5 bg-gray-100 m-2 h-40 w-60 rounded border-sky-100 border-solid border flex flex-col justify-between cursor-pointer hover:bg-gray-50 duration-100">
<div className="flex justify-between text-sky-900 items-center">
<p className="text-lg w-max">{collection.name}</p>
<FontAwesomeIcon icon={faChevronRight} className="w-3" />
<Link href={`/collections/${collection.id}`}>
<div className="p-5 bg-gray-100 m-2 h-40 w-60 rounded border-sky-100 border-solid border flex flex-col justify-between cursor-pointer hover:bg-gray-50 duration-100">
<div className="flex justify-between text-sky-900 items-center">
<p className="text-lg w-max">{collection.name}</p>
<FontAwesomeIcon icon={faChevronRight} className="w-3" />
</div>
<p className="text-sm text-sky-300 font-bold">{formattedDate}</p>
</div>
<p className="text-sm text-sky-300 font-bold">{formattedDate}</p>
</div>
</Link>
);
}