mirror of
https://github.com/Sosokker/B2D-Ventures.git
synced 2025-12-19 22:14:06 +01:00
fix: fix eslint
This commit is contained in:
parent
214a625b3c
commit
e7a1f54b43
@ -1,8 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
||||||
import { useEffect, useState } from "react";
|
import { useState } from "react";
|
||||||
import { Clock3Icon, UserIcon, UsersIcon } from "lucide-react";
|
import { UserIcon, UsersIcon } from "lucide-react";
|
||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import { getAllBusinessTypeQuery, getAllTagsQuery, getAllProjectStatusQuery } from "@/lib/data/dropdownQuery";
|
import { getAllBusinessTypeQuery, getAllTagsQuery, getAllProjectStatusQuery } from "@/lib/data/dropdownQuery";
|
||||||
import { createSupabaseClient } from "@/lib/supabase/clientComponentClient";
|
import { createSupabaseClient } from "@/lib/supabase/clientComponentClient";
|
||||||
|
|||||||
@ -3,46 +3,11 @@ import { Button } from "@/components/ui/button";
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import { ProjectCard } from "@/components/projectCard";
|
|
||||||
import { getTopProjects } from "@/lib/data/projectQuery";
|
import { getTopProjects } from "@/lib/data/projectQuery";
|
||||||
import { createSupabaseClient } from "@/lib/supabase/serverComponentClient";
|
import { createSupabaseClient } from "@/lib/supabase/serverComponentClient";
|
||||||
import { Suspense } from "react";
|
import { Suspense } from "react";
|
||||||
import { FC } from "react";
|
|
||||||
import { ProjectCardProps } from "@/types/ProjectCard";
|
|
||||||
import { ProjectSection } from "@/components/ProjectSection";
|
import { ProjectSection } from "@/components/ProjectSection";
|
||||||
|
|
||||||
interface TopProjectsProps {
|
|
||||||
projects: ProjectCardProps[] | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const TopProjects: FC<TopProjectsProps> = ({ projects }) => {
|
|
||||||
if (!projects || projects.length === 0) {
|
|
||||||
return <div>No top projects available.</div>;
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<div className="grid grid-cols-2 lg:grid-cols-4 gap-4">
|
|
||||||
{projects.map((project) => (
|
|
||||||
<div key={project.id}>
|
|
||||||
<Link href={`/deals/${project.id}`}>
|
|
||||||
<ProjectCard
|
|
||||||
name={project.project_name}
|
|
||||||
description={project.short_description}
|
|
||||||
imageUri={project.image_url}
|
|
||||||
joinDate={new Date(project.join_date).toLocaleDateString()}
|
|
||||||
location={project.location}
|
|
||||||
tags={project.tags}
|
|
||||||
minInvestment={project.min_investment}
|
|
||||||
totalInvestor={project.total_investor}
|
|
||||||
totalRaised={project.total_raise}
|
|
||||||
/>
|
|
||||||
</Link>
|
|
||||||
<Separator />
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const ProjectsLoader = () => (
|
const ProjectsLoader = () => (
|
||||||
<div className="grid grid-cols-2 lg:grid-cols-4 gap-4">
|
<div className="grid grid-cols-2 lg:grid-cols-4 gap-4">
|
||||||
{[...Array(4)].map((_, index) => (
|
{[...Array(4)].map((_, index) => (
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { ProjectCard } from "@/components/projectCard";
|
import { ProjectCard } from "@/components/projectCard";
|
||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { ProjectCardProps } from "@/types/ProjectCard";
|
import { ProjectCardProps } from "@/types/ProjectCard";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
|
|||||||
@ -115,7 +115,7 @@ function searchProjectsQuery(
|
|||||||
tagFilter,
|
tagFilter,
|
||||||
projectStatusFilter,
|
projectStatusFilter,
|
||||||
businessTypeFilter,
|
businessTypeFilter,
|
||||||
sortByTimeFilter,
|
// sortByTimeFilter,
|
||||||
page = 1,
|
page = 1,
|
||||||
pageSize = 4,
|
pageSize = 4,
|
||||||
}: FilterProjectQueryParams
|
}: FilterProjectQueryParams
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user