From 02e204d8772a85a04a4c64539642d713e6ac9b92 Mon Sep 17 00:00:00 2001 From: sirin Date: Thu, 3 Oct 2024 09:20:01 +0700 Subject: [PATCH] Update search result page ui --- src/app/find/page.tsx | 85 ++++++++++++++++++++++++++++++------------- 1 file changed, 60 insertions(+), 25 deletions(-) diff --git a/src/app/find/page.tsx b/src/app/find/page.tsx index 2046dd2..ba616f6 100644 --- a/src/app/find/page.tsx +++ b/src/app/find/page.tsx @@ -1,12 +1,14 @@ "use client"; import { useSearchParams } from "next/navigation"; -import { createClient, SupabaseClient } from "@supabase/supabase-js"; -import { useEffect, useState } from "react"; +import { SupabaseClient } from "@supabase/supabase-js"; import { createSupabaseClient } from "@/lib/supabase/clientComponentClient"; import { dehydrate, HydrationBoundary, QueryClient } from "@tanstack/react-query"; import { useQuery } from "@supabase-cache-helpers/postgrest-react-query"; import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; +import { ExtendableCard } from "@/components/extendableCard"; +import { Separator } from "@/components/ui/separator"; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; interface ProjectInvestmentDetail { minInvestment: number; @@ -19,6 +21,8 @@ interface Project { projectName: string; businessId: string; investmentCount: number; + projectShortDescription: string; + publishedTime: string; ProjectInvestmentDetail: ProjectInvestmentDetail[]; tags: string[]; } @@ -42,6 +46,8 @@ function getProjects(client: SupabaseClient, businessIds: string[]) { id, projectName, businessId, + publishedTime, + projectShortDescription, ProjectInvestmentDetail ( minInvestment, totalInvestment, @@ -116,30 +122,59 @@ export default function Find() { return (
- {results.length === 0 &&

No results found.

} - {results.length > 0 && ( - + )} + +
); }