Skip to content

Commit

Permalink
fix: remove annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
linxianxi committed Jun 17, 2023
1 parent a917e05 commit 0e99f0f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/hooks/useRegisterImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ export default function useRegisterImage(canPreview: boolean, data: ImageElement
// Keep order start
// Resolve https://github.com/ant-design/ant-design/issues/28881
// Only need unRegister when component unMount
// React.useEffect(() => {
// if (groupContext) {
// return groupContext.register(id, registerData);
// }
// }, []);

React.useEffect(() => {
if (groupContext) {
return groupContext.register(id, registerData);
}
}, []);

React.useEffect(() => {
if (groupContext) {
groupContext.register(id, registerData);
}
}, [canPreview, data]);

return id;
Expand Down

0 comments on commit 0e99f0f

Please sign in to comment.