Format and ts errors
This commit is contained in:
parent
64f9c9ddfc
commit
b4fbd1f8e8
|
@ -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<Props> = ({ value, width }) => {
|
|||
{() => (
|
||||
<div>
|
||||
<span>No display for type: </span>{" "}
|
||||
<span className="font-semibold text-slate-600">{value.tag}</span>
|
||||
<span className="font-semibold text-slate-600">{(value as {tag: string}).tag}</span>
|
||||
</div>
|
||||
)}
|
||||
</VariableList>
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user