next-app-with-squiggle/components/DynamicSquiggleEditorWithImportedBindings.tsx

21 lines
561 B
TypeScript
Raw Normal View History

2022-08-01 07:43:16 +00:00
import React from "react";
import dynamic from "next/dynamic";
const SquiggleEditorWithImportedBindings = dynamic<any>(
() => import("@quri/squiggle-components").then((mod) => mod.SquiggleEditorWithImportedBindings),
{
loading: () => <p>Loading...</p>,
ssr: false,
}
)
export function DynamicSquiggleEditorWithImportedBindings( props: any ) {
return (
<SquiggleEditorWithImportedBindings
defaultCode={props.defaultCode}
showSummary={true}
bindingsImportUrl={props.bindingsImportUrl}
/>
)
};