diff --git a/src/hooks/useLine.tsx b/src/hooks/useLine.tsx index 8e696b7..7f93104 100644 --- a/src/hooks/useLine.tsx +++ b/src/hooks/useLine.tsx @@ -1,5 +1,10 @@ import { useEffect, useState } from 'react' -import liff from '@line/liff' +import liff from '@line/liff/core' +import GetOS from '@line/liff/get-os' +import GetLanguage from '@line/liff/get-language' +import GetLineVersion from '@line/liff/get-line-version' +import IsLoggedIn from '@line/liff/is-logged-in' +import SendMessages from '@line/liff/send-messages' export type Status = 'signin' | 'inited' @@ -27,6 +32,11 @@ export const useLine = () => { .catch((err: any) => { console.error({ err }) }) + liff.use(new GetOS()) + liff.use(new GetLanguage()) + liff.use(new GetLineVersion()) + liff.use(new IsLoggedIn()) + liff.use(new SendMessages()) // eslint-disable-next-line react-hooks/exhaustive-deps }, [])