Skip to content

Commit

Permalink
✨ (sources) hide processing phrase for owid data
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Nov 24, 2023
1 parent 569e3c0 commit 4c1988d
Showing 1 changed file with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,26 @@ export const makeSource = ({
const isEmbedded = isEmbeddedInADataPage ?? true
const processingLevelPhrase =
getPhraseForProcessingLevel(owidProcessingLevel)
const hideProcessingPhase =
attribution.toLowerCase() === "our world in data"
return (
<>
<SimpleMarkdownText text={attribution} useParagraphs={false} />
{" – "}
{isEmbedded ? (
<a href={`#${DATAPAGE_SOURCES_AND_PROCESSING_SECTION_ID}`}>
{processingLevelPhrase}
</a>
) : (
processingLevelPhrase
)}{" "}
by Our World in Data
{!hideProcessingPhase && (
<>
{" – "}
{isEmbedded ? (
<a
href={`#${DATAPAGE_SOURCES_AND_PROCESSING_SECTION_ID}`}
>
{processingLevelPhrase}
</a>
) : (
processingLevelPhrase
)}{" "}
by Our World in Data
</>
)}
</>
)
}
Expand Down

0 comments on commit 4c1988d

Please sign in to comment.