diff --git a/src/app/deals/page.tsx b/src/app/deals/page.tsx
index 6aff49f..c60cd9a 100644
--- a/src/app/deals/page.tsx
+++ b/src/app/deals/page.tsx
@@ -3,7 +3,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@
import { useState } from "react";
import { Clock3Icon, MessageSquareIcon, UserIcon, UsersIcon } from "lucide-react";
import { Separator } from "@/components/ui/separator";
-import { ExtendableCard } from "@/components/extendableCard";
+import { ProjectCard } from "@/components/projectCard";
export default function Deals() {
const [postAtFilter, setPostAtFilter] = useState("");
@@ -111,7 +111,7 @@ export default function Deals() {
{/* Block for all the deals */}
{filteredData.map((item, index) => (
-
{}
-interface Project {
- id: string;
- projectName: string;
- businessId: string;
- investmentCount: number;
- projectShortDescription: string;
- publishedTime: string;
+interface Project extends Tables<"Project"> {
ProjectInvestmentDetail: ProjectInvestmentDetail[];
- tags: string[];
}
-interface Business {
- id: string;
- businessName: string;
- joinedDate: string;
+interface Business extends Tables<"Business"> {
Projects: Project[];
}
-function getBusinesses(client: SupabaseClient, query: string | null) {
- return client.from("Business").select("id, businessName, joinedDate").ilike("businessName", `%${query}%`);
-}
-
-function getProjects(client: SupabaseClient, businessIds: string[]) {
- return client
- .from("Project")
- .select(
- `
- id,
- projectName,
- businessId,
- publishedTime,
- projectShortDescription,
- ProjectInvestmentDetail (
- minInvestment,
- totalInvestment,
- targetInvestment
- )
- `
- )
- .in("businessId", businessIds);
-}
-
-function getTags(client: SupabaseClient, projectIds: string[]) {
- return client.from("ItemTag").select("itemId, Tag (value)").in("itemId", projectIds);
-}
-
-function getInvestmentCounts(client: SupabaseClient, projectIds: string[]) {
- return client.from("InvestmentDeal").select("*", { count: "exact", head: true }).in("projectId", projectIds);
-}
-
export default function Find() {
const searchParams = useSearchParams();
const query = searchParams.get("query");
@@ -132,22 +86,6 @@ export default function Find() {