Skip to content

Commit

Permalink
feat: Rename FlagshipLink to WebFlagshipLink
Browse files Browse the repository at this point in the history
  • Loading branch information
Ldoppea committed Sep 24, 2024
1 parent 5081517 commit 5999252
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/targets/browser/makeClient.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import schema from 'src/doctypes'

import CozyClient, { FlagshipLink } from 'cozy-client'
import CozyClient, { WebFlagshipLink } from 'cozy-client'
import { isFlagshipApp, isFlagshipOfflineSupported } from 'cozy-device-helper'
import flag from 'cozy-flags'
import { Intents } from 'cozy-interapp'
Expand All @@ -18,7 +18,8 @@ export const makeClient = intent => {
const protocol = window.location.protocol
const cozyUrl = `${protocol}//${data.domain}`

const shouldUseFlagshipLink = isFlagshipApp() && isFlagshipOfflineSupported()
const shouldUseWebFlagshipLink =
isFlagshipApp() && isFlagshipOfflineSupported()

const client = new CozyClient({
uri: cozyUrl,
Expand All @@ -29,8 +30,8 @@ export const makeClient = intent => {
},
schema,
store: true,
links: shouldUseFlagshipLink
? new FlagshipLink({ webviewIntent: intent })
links: shouldUseWebFlagshipLink
? new WebFlagshipLink({ webviewIntent: intent })
: null
})

Expand Down

0 comments on commit 5999252

Please sign in to comment.