chore: cleanup.

This commit is contained in:
Gervwyk 2022-04-20 09:49:51 +02:00
parent c0df169927
commit 8be4aa5c06
2 changed files with 1 additions and 3 deletions

View File

@ -16,7 +16,7 @@
import React, { useEffect, useState } from 'react';
const MountEvents = ({ ename, children, context, triggerEvent, triggerEventAsync }) => {
const MountEvents = ({ children, context, triggerEvent, triggerEventAsync }) => {
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
useEffect(() => {
@ -32,7 +32,6 @@ const MountEvents = ({ ename, children, context, triggerEvent, triggerEventAsync
setError(err);
}
};
console.log(ename);
mount(); // TODO: check only run once.
return () => {
mounted = false;

View File

@ -36,7 +36,6 @@ const Block = ({
<ErrorBoundary>
<MountEvents
context={context}
ename={`${block.id}-onMount`}
triggerEvent={async () => {
await block.triggerEvent({
name: 'onMount',