|
|
|
@@ -24,6 +24,7 @@ export default function Main() { |
|
|
|
|
|
|
|
const { error } = useSnackbarCustom(); |
|
|
|
const [token, setToken] = useState(""); |
|
|
|
const [customerId, setCustomerId] = useState(0); |
|
|
|
const [qr, setQr] = useState(""); |
|
|
|
|
|
|
|
const { callAPI: callQRサービス券取得用トークン取得 } = useAPICall({ |
|
|
|
@@ -31,6 +32,7 @@ export default function Main() { |
|
|
|
backDrop: true, |
|
|
|
onSuccess: ({ data }) => { |
|
|
|
setToken(data.token); |
|
|
|
setCustomerId(data.customer_id); |
|
|
|
}, |
|
|
|
onFailed: () => { |
|
|
|
error("QR表示失敗しました"); |
|
|
|
@@ -42,9 +44,10 @@ export default function Main() { |
|
|
|
return getFullPath(PageID.QRサービス券発行申請, { |
|
|
|
query: { |
|
|
|
token, |
|
|
|
customerId: String(customerId), |
|
|
|
}, |
|
|
|
}); |
|
|
|
}, [token]); |
|
|
|
}, [token, customerId]); |
|
|
|
|
|
|
|
const fetch = () => { |
|
|
|
callQRサービス券取得用トークン取得({}); |
|
|
|
|