Skip to content

Commit

Permalink
feat(client): Add Drought layers
Browse files Browse the repository at this point in the history
SS-52
  • Loading branch information
clementprdhomme committed Nov 6, 2024
1 parent b1cedb1 commit 103c2e3
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions client/src/components/panels/drought/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,34 @@
import DatasetCard from "@/components/dataset-card";
import { Skeleton } from "@/components/ui/skeleton";
import useDatasetsBySubTopic from "@/hooks/use-datasets-by-sub-topic";

const DroughtPanel = () => {
const { data, isLoading } = useDatasetsBySubTopic("drought", ["name", "params_config"]);

return (
<div className="min-h-screen lg:min-h-0">
<div className="py-11 text-center font-semibold">Coming soon!</div>
<div className="min-h-screen px-5 py-5 lg:min-h-0 lg:px-10">
{isLoading && (
<div className="flex flex-col gap-6">
<Skeleton className="h-7 w-2/5" />
<Skeleton className="h-72 w-full" />
<Skeleton className="h-72 w-full" />
<Skeleton className="h-7 w-2/5" />
<Skeleton className="h-72 w-full" />
<Skeleton className="h-72 w-full" />
</div>
)}
{!isLoading && (
<div className="flex flex-col gap-6">
{data.map(({ subTopic, datasets }) => (
<div key={subTopic} className="flex flex-col gap-6">
<h2 className="uppercase">{subTopic}</h2>
{datasets.map((dataset) => (
<DatasetCard key={dataset.id} {...dataset} />
))}
</div>
))}
</div>
)}
</div>
);
};
Expand Down

0 comments on commit 103c2e3

Please sign in to comment.