Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
Remove unused EVENT.TYPE declaration and unused eventType context…
Browse files Browse the repository at this point in the history
… value
  • Loading branch information
Andarist committed Sep 9, 2021
1 parent ccd5337 commit 182b79d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/EventsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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': () => ({}),
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 182b79d

Please sign in to comment.