Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: liff 2.22, enable pluggable #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/hooks/useLine.tsx
Original file line number Diff line number Diff line change
@@ -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'

Expand Down Expand Up @@ -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
}, [])

Expand Down