Skip to content

Commit

Permalink
fix: Remove duplicate WebviewIntentProvider
Browse files Browse the repository at this point in the history
WebviewIntentProvider is already added in apps using the bar.
  • Loading branch information
zatteo authored and acezard committed Dec 9, 2022
1 parent 38732cc commit 924b4b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -116,7 +116,6 @@
"semver-compare": "^1.0.0"
},
"peerDependencies": {
"cozy-intent": ">=1.7.0",
"@cozy/minilog": "^1.0.0",
"cozy-client": "^34.1.5",
"cozy-device-helper": "2.6.0",
Expand Down
19 changes: 8 additions & 11 deletions src/index.jsx
Expand Up @@ -26,7 +26,6 @@ import {
import enLocale from 'locales/en.json'
import frLocale from 'locales/fr.json'
import esLocale from 'locales/es.json'
import { WebviewIntentProvider } from 'cozy-intent'
const locales = {
en: enLocale,
fr: frLocale,
Expand Down Expand Up @@ -91,17 +90,15 @@ const renderBar = (barNode, options) => {

const barComponent = (
<Provider store={options.reduxStore}>
<WebviewIntentProvider>
<EnhancedI18n dictRequire={lang => locales[lang]}>
{cozyClient ? (
<CozyProvider client={cozyClient}>
<Bar {...options} />
</CozyProvider>
) : (
<EnhancedI18n dictRequire={lang => locales[lang]}>
{cozyClient ? (
<CozyProvider client={cozyClient}>
<Bar {...options} />
)}
</EnhancedI18n>
</WebviewIntentProvider>
</CozyProvider>
) : (
<Bar {...options} />
)}
</EnhancedI18n>
</Provider>
)

Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Expand Up @@ -4106,9 +4106,9 @@ cozy-flags@^2.10.2:
microee "^0.0.6"

cozy-intent@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/cozy-intent/-/cozy-intent-1.7.0.tgz#3294d717562154d169750b7859c27d781f2cfc60"
integrity sha512-KlELg/Yz2yA0BQvEXMZ0OOesf7hZGyKMgRUO02drxK7HRuBaEoMIpFIrZuaQSCoWlK90ffxxQzMtLVW/rwFDOg==
version "1.17.3"
resolved "https://registry.yarnpkg.com/cozy-intent/-/cozy-intent-1.17.3.tgz#dcf8085a9c561ce56ab0c7afc69474243e4f9e9c"
integrity sha512-Qko/tUJlXWh5wYLfw+CknbIm+KeAW4F3lAk/n1CA+uKwcseua+LCoNIypC/04ttm9g6ntbEogb/u4h6d5+H6lg==
dependencies:
post-me "0.4.5"

Expand Down

0 comments on commit 924b4b0

Please sign in to comment.