mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-03-19 15:01:06 +08:00
chore: cleanup.
This commit is contained in:
parent
c0df169927
commit
8be4aa5c06
@ -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;
|
||||
|
@ -36,7 +36,6 @@ const Block = ({
|
||||
<ErrorBoundary>
|
||||
<MountEvents
|
||||
context={context}
|
||||
ename={`${block.id}-onMount`}
|
||||
triggerEvent={async () => {
|
||||
await block.triggerEvent({
|
||||
name: 'onMount',
|
||||
|
Loading…
x
Reference in New Issue
Block a user