Skip to content

Commit

Permalink
fix(contribution-card): if no type, no badge
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihoub2 committed May 23, 2024
1 parent b05dc3c commit 4b42ee3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/api/utils/buildURL.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ export const buildURL = (
const whereQuery =
Object.keys(where).length > 0 ? `&where=${JSON.stringify(where)}` : "";

return `/api/${baseUrl}?${sorted}&page=${page}&max_results=20${whereQuery}`;
// return `/api/${baseUrl}?${sorted}&page=${page}&max_results=20${whereQuery}`;
return `https://scanr-api.dataesr.ovh/${baseUrl}?${sorted}&page=${page}&max_results=20${whereQuery}`;
};
16 changes: 9 additions & 7 deletions src/pages/contribution-page/contribution-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ const ContributionItem = ({
>
{data.status}
</Badge>
<Badge
size="sm"
color={BadgeColor({ type: data.type })}
className="fr-mr-1w fr-mb-1w status"
>
{data.type}
</Badge>
{data.type && (
<Badge
size="sm"
color={BadgeColor({ type: data.type })}
className="fr-mr-1w fr-mb-1w status"
>
{data.type}
</Badge>
)}
</Col>
<Text size="sm">
<i className="date">
Expand Down

0 comments on commit 4b42ee3

Please sign in to comment.