diff --git a/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx b/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx index 8bd32292..261c189b 100644 --- a/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx +++ b/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx @@ -2,7 +2,7 @@ import React, { useContext } from "react"; import { SqDistributionTag, SqValue, SqValueTag } from "@quri/squiggle-lang"; import { NumberShower } from "../NumberShower"; import { DistributionChart, defaultPlot, makePlot } from "../DistributionChart"; -import { FunctionChart, FunctionChartSettings } from "../FunctionChart"; +import { FunctionChart } from "../FunctionChart"; import clsx from "clsx"; import { VariableBox } from "./VariableBox"; import { ItemSettingsMenu } from "./ItemSettingsMenu"; @@ -298,7 +298,7 @@ export const ExpressionViewer: React.FC = ({ value, width }) => { {() => (
No display for type: {" "} - {value.tag} + {(value as {tag: string}).tag}
)} diff --git a/packages/components/src/lib/hooks/useSquiggle.ts b/packages/components/src/lib/hooks/useSquiggle.ts index 9878206e..eba85eaf 100644 --- a/packages/components/src/lib/hooks/useSquiggle.ts +++ b/packages/components/src/lib/hooks/useSquiggle.ts @@ -67,15 +67,17 @@ export const useSquiggle = (args: SquiggleArgs) => { ); }, [result, onChange]); - useEffect(() => { - return () => { - if (result.needsClean) args.project.clean(result.sourceName); - if (args.project.getSource(importSourceName(result.sourceName))) - args.project.clean(result.sourceName); - }; - }, - // eslint-disable-next-line react-hooks/exhaustive-deps - []); + useEffect( + () => { + return () => { + if (result.needsClean) args.project.clean(result.sourceName); + if (args.project.getSource(importSourceName(result.sourceName))) + args.project.clean(result.sourceName); + }; + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [] + ); return result; };