fix: designed bugs
This commit is contained in:
parent
b53051b77f
commit
957b05cdbd
|
|
@ -267,9 +267,8 @@ export function GreenInnovationPage() {
|
|||
|
||||
try {
|
||||
fetchingRef.current = true;
|
||||
|
||||
if (reset) {
|
||||
setLoading(true);
|
||||
|
||||
setCurrentPage(1);
|
||||
} else {
|
||||
setLoadingMore(true);
|
||||
|
|
@ -396,6 +395,9 @@ export function GreenInnovationPage() {
|
|||
};
|
||||
}, [loadMore, hasMore, loadingMore]);
|
||||
|
||||
useEffect(()=>{
|
||||
setLoading(true);
|
||||
},[])
|
||||
const handleSort = (field: string) => {
|
||||
fetchingRef.current = false;
|
||||
setSortConfig((prev) => ({
|
||||
|
|
@ -679,10 +681,10 @@ export function GreenInnovationPage() {
|
|||
|
||||
return (
|
||||
<DashboardLayout title="نوآوری سبز">
|
||||
<div className="p-6 space-y-4">
|
||||
<div className="p-6 space-y-4 h-[23.5rem]">
|
||||
{/* Stats Cards */}
|
||||
<div className="flex gap-6 mb-5">
|
||||
<div className="flex flex-col justify-between h-[25.5rem] w-1/2">
|
||||
<div className="flex flex-col justify-between w-1/2">
|
||||
{loading || statsLoading
|
||||
? // Loading skeleton for stats cards - matching new design
|
||||
Array.from({ length: 2 }).map((_, index) => (
|
||||
|
|
@ -690,7 +692,7 @@ export function GreenInnovationPage() {
|
|||
key={`skeleton-${index}`}
|
||||
className="bg-[linear-gradient(to_bottom_left,#464861,50%,#111628)] backdrop-blur-sm rounded-lg overflow-hidden"
|
||||
>
|
||||
<CardContent className="p-0 h-48">
|
||||
<CardContent className="p-0 h-[11.5rem]">
|
||||
<div className="flex flex-col gap-2 h-full">
|
||||
<div className="border-b-2 border-gray-500/20 p-2.5">
|
||||
<div
|
||||
|
|
@ -779,7 +781,7 @@ export function GreenInnovationPage() {
|
|||
))}
|
||||
</div>
|
||||
|
||||
<div className="h-72 w-full min-w-[35rem] flex items-end justify-between px-6">
|
||||
<div className="h-[17rem] w-full min-w-[35rem] flex items-end justify-between px-6">
|
||||
{[...Array(8)].map((_, barIndex) => (
|
||||
<div
|
||||
key={barIndex}
|
||||
|
|
@ -802,7 +804,7 @@ export function GreenInnovationPage() {
|
|||
<span>بازیافت و بازیابی منابع</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="content grid gap-6 h-max p-8 box-border items-center justify-between sm:grid-cols-1 sm:overflow-x-scroll xl:overflow-hidden xl:grid-cols-[30%_70%]">
|
||||
<div className="content grid gap-9 h-max p-8 box-border items-center justify-between sm:grid-cols-1 sm:overflow-x-scroll xl:overflow-hidden xl:grid-cols-[30%_70%]">
|
||||
<div className="params flex flex-col gap-3.5">
|
||||
{Object.entries(recycleParams).map((el, index) => {
|
||||
return (
|
||||
|
|
@ -826,7 +828,7 @@ export function GreenInnovationPage() {
|
|||
})}
|
||||
</div>
|
||||
|
||||
<div className="h-72 w-full">
|
||||
<div className="h-64 w-full">
|
||||
<ResponsiveContainer width="100%" height="100%">
|
||||
<BarChart
|
||||
width={500}
|
||||
|
|
@ -865,7 +867,7 @@ export function GreenInnovationPage() {
|
|||
fontSize: 14, // سایز فونت
|
||||
dx: -30, // جابجایی افقی (اعداد نزدیکتر یا دورتر از محور)
|
||||
}}
|
||||
tickFormatter={(val) => `${val}%`}
|
||||
tickFormatter={(val) => `${formatNumber(val)}%`}
|
||||
/>
|
||||
<Bar
|
||||
dataKey="pv"
|
||||
|
|
@ -876,7 +878,7 @@ export function GreenInnovationPage() {
|
|||
position: "top",
|
||||
fill: "#fff",
|
||||
fontWeight: "bold",
|
||||
formatter: (value: any) => `${value}%`,
|
||||
formatter: (value: any) => `${formatNumber(value)}%`,
|
||||
}}
|
||||
/>
|
||||
</BarChart>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user