Skip to content

Commit

Permalink
refactor: Links should be array
Browse files Browse the repository at this point in the history
  • Loading branch information
paultranvan committed Jan 27, 2025
1 parent 9fec2d0 commit 926f0c5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/AppWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ export const setupAppContext = memoize(intent => {
const root = document.querySelector('[role=application]')
const data = root.dataset

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

const links = shouldUseWebFlagshipLink
? [new WebFlagshipLink({ webviewIntent: intent })]
: null

// New improvements must be done with CozyClient
const cozyClient = new CozyClient({
Expand All @@ -56,9 +61,7 @@ export const setupAppContext = memoize(intent => {
)
? true
: false,
links: shouldUseWebFlagshipLink
? new WebFlagshipLink({ webviewIntent: intent })
: null
links
})

cozyClient.registerPlugin(flag.plugin)
Expand Down

0 comments on commit 926f0c5

Please sign in to comment.