From 182b79d900cff5741bee9cec829efb07a802cff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Thu, 9 Sep 2021 09:34:35 +0200 Subject: [PATCH] Remove unused `EVENT.TYPE` declaration and unused `eventType` context value --- src/EventsPanel.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/EventsPanel.tsx b/src/EventsPanel.tsx index 66e321c9..1db3c0cc 100644 --- a/src/EventsPanel.tsx +++ b/src/EventsPanel.tsx @@ -316,12 +316,10 @@ const EventRow: React.FC<{ event: SimEvent }> = ({ event }) => { const newEventModel = createModel( { - eventType: '', eventString: `{\n\t"type": ""\n}`, }, { events: { - 'EVENT.TYPE': (value: string) => ({ value }), 'EVENT.PAYLOAD': (value: string) => ({ value }), 'EVENT.SEND': () => ({}), 'EVENT.RESET': () => ({}), @@ -381,10 +379,7 @@ const NewEvent: React.FC<{ actions: { sendEvent: (ctx) => { try { - const scxmlEvent = toSCXMLEvent({ - type: ctx.eventType, - ...JSON.parse(ctx.eventString), - }); + const scxmlEvent = toSCXMLEvent(JSON.parse(ctx.eventString)); onSend(scxmlEvent); } catch (e) {