From 96487b8544ef5a77bcb50d47332f46a8eaa7ebc9 Mon Sep 17 00:00:00 2001 From: Giovanni Abbatepaolo <30571828+bbtgnn@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:39:26 +0200 Subject: [PATCH] fix: reactivity (#18) --- .../dyne-slangroom-editor.tsx | 39 ++++++++----------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/src/components/dyne-slangroom-editor/dyne-slangroom-editor.tsx b/src/components/dyne-slangroom-editor/dyne-slangroom-editor.tsx index b123362..e925a0b 100644 --- a/src/components/dyne-slangroom-editor/dyne-slangroom-editor.tsx +++ b/src/components/dyne-slangroom-editor/dyne-slangroom-editor.tsx @@ -238,8 +238,8 @@ function ValueRenderer(props: { value: SlangroomValue }) {
@@ -280,27 +280,22 @@ function ZencodeErrorRenderer(props: { error: ZencodeRuntimeError }) { const { error } = props; return (
- - <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> ); }