Skip to content

Commit

Permalink
fix: intervention layout, empty tags
Browse files Browse the repository at this point in the history
  • Loading branch information
pReya committed Sep 21, 2023
1 parent 722573c commit 6b1bf96
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/InterventionsListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const InterventionsListItem: React.FC<Props> = ({
</div>
<a
href={href}
className="group hover:translate-x-4 transition-transform mt-20"
className="group w-full hover:translate-x-4 transition-transform mt-20"
>
<div className="flex flex-col lg:flex-row overflow-hidden z-10 gap-8">
{image && (
Expand Down
10 changes: 7 additions & 3 deletions src/components/Tag.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import React from "react";

const Tag = ({ title }: { title: string }) => {
return (
interface Props {
title: string;
}

const Tag: React.FC<Props> = ({ title }) => {
return title ? (
<span className="inline-block bg-tolo-green rounded-full px-4 py-1 text-lg leading-6 font-medium text-white mr-2 mb-2">
{title}
</span>
);
) : null;
};

export default Tag;
2 changes: 1 addition & 1 deletion src/util/ContentTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function trimAndSortInterventions(
? rawSortedInterventionsContentWithoutIndex.slice(0, count)
: rawSortedInterventionsContentWithoutIndex;

return trimmedInterventions;
return trimmedInterventions.filter(Boolean);
}

export function transformInterventionsToPoiData(
Expand Down

0 comments on commit 6b1bf96

Please sign in to comment.