Skip to content

Commit

Permalink
fix: Add AlertProvider to BarRightWithProvider
Browse files Browse the repository at this point in the history
Without this, the app will crash because the cozy bar context
can't find the alert provider context
  • Loading branch information
acezard committed Jan 5, 2024
1 parent c9f2364 commit 750b42e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useClient } from 'cozy-client'
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
import { useWebviewIntent } from 'cozy-intent'
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
import AlertProvider from 'cozy-ui/transpiled/react/providers/Alert'

const wrap = (Component, className) => {
const WrappedBarComponent = ({ children }) => {
Expand Down Expand Up @@ -47,7 +48,9 @@ export const BarRightWithProvider = ({ store, children }) => {
webviewService={webviewIntent}
>
<VaultProvider cozyClient={client}>
<VaultUnlockProvider>{children}</VaultUnlockProvider>
<VaultUnlockProvider>
<AlertProvider>{children}</AlertProvider>
</VaultUnlockProvider>
</VaultProvider>
</BarContextProvider>
</BarRight>
Expand Down

0 comments on commit 750b42e

Please sign in to comment.