[TQRCode] useEffect 오타 수정
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import QRCodeMin from "!!raw-loader!../../utils/qrcode.min.js";
|
||||
import QRCodeMin from "utils/qrcode.min.js";
|
||||
|
||||
import { getDeviceAdditionInfo } from "../../actions/deviceActions";
|
||||
import { scaleH, scaleW } from "../../utils/helperMethods";
|
||||
@@ -15,12 +15,9 @@ export default function TQRCode({ text, menu, width = "128", height = "128" }) {
|
||||
const deviceInfo = useSelector((state) => state.device.deviceInfo);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
useEffect(
|
||||
() => {
|
||||
dispatch(getDeviceAdditionInfo());
|
||||
},
|
||||
{ dispatch }
|
||||
);
|
||||
useEffect(() => {
|
||||
dispatch(getDeviceAdditionInfo());
|
||||
}, [dispatch]);
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof window === "object" && deviceInfo && menu) {
|
||||
|
||||
Reference in New Issue
Block a user