Skip to content

Commit

Permalink
fix: Wrap IntentTriggerManager inside ComponentsPropsProvider
Browse files Browse the repository at this point in the history
We added this ComponentsPropsProvider a few weeks ago. We added
it to the Routes component, so if we use Harvest from the
HarvestRoute, the CannotConnectModal was well displayed.

But if we used Harvest from the IntentTriggerManager, which
is used by the cozy-home when called from the Store, then this
Provider was not set and we throwed an error.

This PR fix this issue, so the CannotConnectModal is now displayed
even from the Intent.
  • Loading branch information
Crash-- committed May 23, 2023
1 parent 6354f80 commit 47c2bb2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/cozy-harvest-lib/src/components/TriggerManager.jsx
Expand Up @@ -19,6 +19,7 @@ import AccountForm from './AccountForm'
import FlowProvider from './FlowProvider'
import HarvestVaultProvider from './HarvestVaultProvider'
import OAuthForm from './OAuthForm'
import ComponentsPropsProvider from './Providers/ComponentsPropsProvider'
import VaultCiphersList from './VaultCiphersList'
import VaultUnlockProvider from './VaultUnlockProvider'
import { fetchAccount } from '../connections/accounts'
Expand Down Expand Up @@ -514,8 +515,10 @@ export const IntentTriggerManager = ({ vaultUnlockFormProps, ...props }) => {
return (
<HarvestVaultProvider>
<VaultUnlockProvider>
<LegacyTriggerManager {...props} />
<VaultUnlockPlaceholder unlockFormProps={vaultUnlockFormProps} />
<ComponentsPropsProvider>
<LegacyTriggerManager {...props} />
<VaultUnlockPlaceholder unlockFormProps={vaultUnlockFormProps} />
</ComponentsPropsProvider>
</VaultUnlockProvider>
</HarvestVaultProvider>
)
Expand Down

0 comments on commit 47c2bb2

Please sign in to comment.