Skip to content

Commit

Permalink
Use !! to coerce value to boolean
Browse files Browse the repository at this point in the history
Co-Authored-By: Gareth Estchild <[email protected]>
  • Loading branch information
kenoir and gestchild committed Dec 2, 2024
1 parent 649a18e commit d9b60e5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions content/webapp/pages/concepts/[conceptId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,11 @@ const ImagesTabPanel: FunctionComponent<ImagesTabPanelProps> = ({
results,
totalResults,
}) => {
const showSeeMore = totalResults !== undefined && totalResults > 0;

return (
<div role="tabpanel" id={`tabpanel-${id}`} aria-labelledby={`tab-${id}`}>
<ImageEndpointSearchResults images={results.pageResults} />
<Space $v={{ size: 'm', properties: ['margin-top'] }}>
{showSeeMore && (
{!!totalResults && (
<SeeMoreButton
text="All images"
totalResults={totalResults}
Expand All @@ -187,14 +185,12 @@ const WorksTabPanel: FunctionComponent<WorksTabPanelProps> = ({
results,
totalResults,
}) => {
const showSeeMore = totalResults !== undefined && totalResults > 0;

return (
<Container>
<div role="tabpanel" id={`tabpanel-${id}`} aria-labelledby={`tab-${id}`}>
<WorksSearchResults works={results.pageResults} />
<Space $v={{ size: 'l', properties: ['padding-top'] }}>
{showSeeMore && (
{!!totalResults && (
<SeeMoreButton
text="All works"
totalResults={totalResults}
Expand Down

0 comments on commit d9b60e5

Please sign in to comment.