Skip to content

Commit

Permalink
fix: convert Thumbnail to tsx to make graphql-codegen happy
Browse files Browse the repository at this point in the history
- Thumbnail being js somehow break codegen extraction in CooccurrenceSection
    - Ref: dotansimha/graphql-code-generator#8570 (comment)
- remove `??` to make old prettier happy
  • Loading branch information
MrOrz committed Sep 29, 2024
1 parent 5eddb4f commit e5d9c5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/Thumbnail.js → components/Thumbnail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function Thumbnail({ article, className }) {

switch (article.articleType) {
case 'IMAGE': {
const altText = ellipsis(article.text ?? '', { wordCount: 40 });
const altText = ellipsis(article.text || '', { wordCount: 40 });
return (
<img
className={thumbnailCls}
Expand Down

0 comments on commit e5d9c5d

Please sign in to comment.