Skip to content

Commit 553451e

Browse files
committed
Move coverPosition up to make husky happy
1 parent d037f9c commit 553451e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/block.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ export const Block: React.FC<Block> = props => {
8585
page_small_text
8686
} = blockValue.format || {};
8787

88+
const coverPosition = (1 - (page_cover_position || 0.5)) * 100;
89+
8890
return (
8991
<div className="notion">
9092
{page_cover && (
@@ -93,9 +95,7 @@ export const Block: React.FC<Block> = props => {
9395
alt={getTextContent(blockValue.properties.title)}
9496
className="notion-page-cover"
9597
style={{
96-
objectPosition: `center ${
97-
(1 - (page_cover_position || 0.5)) * 100
98-
}%`
98+
objectPosition: `center ${coverPosition}%`
9999
}}
100100
/>
101101
)}

0 commit comments

Comments
 (0)