From b82bcce30071bddbfe61dd974edafdb79ba8200b Mon Sep 17 00:00:00 2001 From: yuma-kitamura Date: Fri, 28 Apr 2023 16:33:02 +0900 Subject: [PATCH] chore: liff 2.22, enable pluggable --- src/hooks/useLine.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 }, [])