Skip to content

Commit

Permalink
fix: reactivity (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbtgnn authored Aug 5, 2024
1 parent f5b738b commit 96487b8
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions src/components/dyne-slangroom-editor/dyne-slangroom-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ function ValueRenderer(props: { value: SlangroomValue }) {
<Section title="Result">
<dyne-code-editor
name={EditorId.RESULT}
content={JSON.stringify(props.value, null, 2)}
config={{
doc: JSON.stringify(props.value, null, 2),
extensions: [json()],
}}
></dyne-code-editor>
Expand Down Expand Up @@ -280,27 +280,22 @@ function ZencodeErrorRenderer(props: { error: ZencodeRuntimeError }) {
const { error } = props;
return (
<div>
<Title name="trace" className="mb-1" />
<dyne-code-editor
config={{
doc: error.trace.join('\n'),
}}
></dyne-code-editor>

<Title name="logs" className="mb-1" />
<dyne-code-editor
config={{
doc: error.logs.join('\n'),
}}
></dyne-code-editor>

<Title name="heap" className="mb-1" />
<dyne-code-editor
config={{
doc: JSON.stringify(error.heap, null, 2),
extensions: [json()],
}}
></dyne-code-editor>
<Section title="Trace">
<dyne-code-editor content={error.trace.join('\n')}></dyne-code-editor>
</Section>

<Section title="Logs">
<dyne-code-editor content={error.logs.join('\n')}></dyne-code-editor>
</Section>

<Section title="Heap">
<dyne-code-editor
content={JSON.stringify(error.heap, null, 2)}
config={{
extensions: [json()],
}}
></dyne-code-editor>
</Section>
</div>
);
}
Expand Down

0 comments on commit 96487b8

Please sign in to comment.