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