diff --git a/src/data/common.tsx b/src/data/common.tsx index ab33aa6..1fdfd61 100644 --- a/src/data/common.tsx +++ b/src/data/common.tsx @@ -462,13 +462,13 @@ export function createFormulaPreview( formula: GenericFormula, showPreview: Computable, previewAmount: Computable = 1 -): ComputedRef { +) { const processedShowPreview = convertComputable(showPreview); const processedPreviewAmount = convertComputable(previewAmount); if (!formula.hasVariable()) { throw new Error("Cannot create formula preview if the formula does not have a variable"); } - return computed(() => { + return jsx(() => { if (unref(processedShowPreview)) { const curr = formatSmall(formula.evaluate()); const preview = formatSmall( @@ -479,16 +479,16 @@ export function createFormulaPreview( ) ) ); - return jsx(() => ( + return ( <> - {curr}→{preview} + {curr} → {preview} - )); + ); } - return formatSmall(formula.evaluate()); + return <>{formatSmall(formula.evaluate())}; }); }