Skip to content

Commit

Permalink
Projects list fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarrenechea committed Nov 14, 2023
1 parent 945351e commit 6633e69
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
4 changes: 1 addition & 3 deletions client/src/containers/map/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ export default function MapContainer({ id = "default" }: { id?: string }) {
(f) => f.layer.source === "countries-source" || f.layer.source === "projects-source",
);

if (COUNTRY_FEATURE) {
setCountry(COUNTRY_FEATURE?.properties?.iso3);
}
setCountry(COUNTRY_FEATURE?.properties?.iso3);
}
};

Expand Down
2 changes: 1 addition & 1 deletion client/src/containers/projects/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Projects = () => {
});

return (
<ul className="grid grid-cols-1 gap-2.5">
<ul className="grid grid-cols-1 gap-5 divide-y divide-gray-200">
{projectsData?.data?.map((p) => {
if (!p.id) return null;

Expand Down
17 changes: 12 additions & 5 deletions client/src/containers/projects/item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,24 @@ const ProjectsItem = (project: ProjectListResponseDataItem) => {
return (
<div
className={cn({
"group cursor-pointer space-y-2 rounded-xl bg-gradient-to-r p-5 text-white": true,
[PROJECT_PILLARS[`${pillar?.data?.attributes?.name}`]?.color]: true,
"group cursor-pointer space-y-2 pt-5": true,
})}
onClick={handleClick}
>
<h3 className="text-xs">{pillar?.data?.attributes?.name}</h3>
<h2 className="font-metropolis text-lg font-black tracking-tight group-hover:underline">
<h3 className="text-xs">
<div
className={cn({
"mr-1 inline-block h-2 w-2 rounded-full bg-gradient-to-r": true,
[PROJECT_PILLARS[`${pillar?.data?.attributes?.name}`]?.color]: true,
})}
/>
{pillar?.data?.attributes?.name}
</h3>
<h2 className="pl-3 text-xl font-semibold text-gray-900 group-hover:underline">
{project?.attributes?.name}
</h2>

<div className="text-xxs">
<div className="pl-3 text-xxs">
{countries?.data
?.map((c) => {
if (!c.id || !c.attributes) return null;
Expand Down

0 comments on commit 6633e69

Please sign in to comment.