Skip to content

Commit ed82e58

Browse files
Merge pull request NotionX#365 from utkuturunc/formulavar
2 parents 16d1870 + 570155d commit ed82e58

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/react-notion-x/src/third-party/property.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { Text } from '../components/text'
1111
import { useNotionContext } from '../context'
1212
import { cs } from '../utils'
1313
import { evalFormula } from './eval-formula'
14+
import { FormulaResult } from 'notion-types'
1415

1516
export interface IPropertyProps {
1617
propertyId?: string
@@ -77,10 +78,10 @@ export const PropertyImpl: React.FC<IPropertyProps> = (props) => {
7778
const renderFormulaValue = React.useMemo(
7879
() =>
7980
function FormulaProperty() {
80-
let content: string
81+
let content: FormulaResult | null
8182

8283
try {
83-
let content = evalFormula(schema.formula, {
84+
content = evalFormula(schema.formula, {
8485
schema: collection?.schema,
8586
properties: block?.properties
8687
})

0 commit comments

Comments
 (0)