Skip to content

Commit

Permalink
Run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiaslins committed Jul 7, 2020
1 parent 6b2c280 commit 98dcf3e
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions src/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -363,22 +363,21 @@ export const Block: React.FC<Block> = props => {
</div>
);
case "bookmark":
const link = blockValue.properties.link
const title = blockValue.properties.title ?? link
const description = blockValue.properties.description
const block_color = blockValue.format?.block_color
const bookmark_icon = blockValue.format?.bookmark_icon
const bookmark_cover = blockValue.format?.bookmark_cover
const link = blockValue.properties.link;
const title = blockValue.properties.title ?? link;
const description = blockValue.properties.description;
const block_color = blockValue.format?.block_color;
const bookmark_icon = blockValue.format?.bookmark_icon;
const bookmark_cover = blockValue.format?.bookmark_cover;

return (
<div className="notion-row">
<a
target="_blank"
rel="noopener noreferrer"
className={classNames(
"notion-bookmark",
block_color &&
`notion-${block_color}`
block_color && `notion-${block_color}`
)}
href={link[0][0]}
>
Expand All @@ -391,23 +390,17 @@ export const Block: React.FC<Block> = props => {
{renderChildText(description)}
</div>
)}

<div className="notion-bookmark-link">
{bookmark_icon && (
<img
src={bookmark_icon}
alt={getTextContent(title)}
/>
<img src={bookmark_icon} alt={getTextContent(title)} />
)}
<div>{renderChildText(link)}</div>
</div>
</div>
{bookmark_cover && (
<div className="notion-bookmark-image">
<img
src={bookmark_cover}
alt={getTextContent(title)}
/>
<img src={bookmark_cover} alt={getTextContent(title)} />
</div>
)}
</a>
Expand Down

0 comments on commit 98dcf3e

Please sign in to comment.