diff --git a/packages/ui-react/package.json b/packages/ui-react/package.json index 43ac7aeb..c46fc46f 100644 --- a/packages/ui-react/package.json +++ b/packages/ui-react/package.json @@ -14,6 +14,7 @@ }, "dependencies": { "@tmagic/schema": "^1.0.0-rc.3", + "qrcode": "^1.5.0", "react": "^17.0.0", "react-dom": "^17.0.0" }, diff --git a/packages/ui-react/src/button/Button.tsx b/packages/ui-react/src/button/Button.tsx index 611a1228..57a399a9 100644 --- a/packages/ui-react/src/button/Button.tsx +++ b/packages/ui-react/src/button/Button.tsx @@ -16,7 +16,7 @@ * limitations under the License. */ -import React from 'react'; +import React, { useRef } from 'react'; import { MComponent } from '@tmagic/schema'; @@ -27,7 +27,7 @@ interface ButtonProps { } const Page: React.FC = ({ config }) => { - const { app, ref } = useApp({ config }); + const { app } = useApp({ config }); if (!app) return null; @@ -35,10 +35,9 @@ const Page: React.FC = ({ config }) => { return (