mirror of
https://github.com/Sosokker/B2D-Ventures.git
synced 2025-12-19 05:54:06 +01:00
connect image carousel to database
This commit is contained in:
parent
71d1d3c1fc
commit
b25895e5ad
@ -35,13 +35,13 @@ export default async function ProjectDealPage({ params }: { params: { id: number
|
||||
// timeDiff, if negative convert to zero
|
||||
const timeDiff = Math.max((new Date(projectData.investment_deadline)).getTime() - new Date().getTime(), 0)
|
||||
const hourLeft = Math.floor(timeDiff / (1000 * 60 * 60));
|
||||
console.log(hourLeft)
|
||||
|
||||
const carouselData = [
|
||||
{ src: "/boiler1.jpg", alt: "Boiler 1" },
|
||||
{ src: "/boiler1.jpg", alt: "Boiler 1" },
|
||||
{ src: "/boiler1.jpg", alt: "Boiler 1" },
|
||||
{ src: "/boiler1.jpg", alt: "Boiler 1" },
|
||||
{ src: "/boiler1.jpg", alt: "Boiler 1" },
|
||||
{ src: projectData.card_image_url, alt: `${projectData.project_name} Image` },
|
||||
{ src: projectData.card_image_url, alt: `${projectData.project_name} Image` },
|
||||
{ src: projectData.card_image_url, alt: `${projectData.project_name} Image` },
|
||||
{ src: projectData.card_image_url, alt: `${projectData.project_name} Image` },
|
||||
{ src: projectData.card_image_url, alt: `${projectData.project_name} Image` },
|
||||
];
|
||||
|
||||
return (
|
||||
@ -95,7 +95,6 @@ export default async function ProjectDealPage({ params }: { params: { id: number
|
||||
<div id="stats" className="flex flex-col w-full mt-4 pl-12">
|
||||
<div className="pl-5">
|
||||
<span>
|
||||
{/* #TODO use sum() instead of storing total in database */}
|
||||
<h1 className="font-semibold text-xl md:text-4xl mt-8">${totalDealAmount}</h1>
|
||||
<p className="text-sm md:text-lg">
|
||||
{toPercentage(totalDealAmount, projectData?.target_investment)}%
|
||||
|
||||
@ -79,6 +79,7 @@ async function getProjectData(client: SupabaseClient, projectId: number) {
|
||||
project_short_description,
|
||||
project_description,
|
||||
published_time,
|
||||
card_image_url,
|
||||
...project_investment_detail!inner (
|
||||
min_investment,
|
||||
total_investment,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user