Skip to content

Commit

Permalink
feat: Use CozyConfirmDialogProvider
Browse files Browse the repository at this point in the history
To allow harvest to open Confirm Dialogs outside of its components tree
  • Loading branch information
doubleface authored and doubleface committed Dec 8, 2022
1 parent 9a5ed3b commit a406026
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/components/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,24 @@ import ScrollToTopOnMount from 'components/ScrollToTopOnMount'
import Services from 'components/Services'
import FooterLogo from 'components/FooterLogo'
import Shortcuts from 'components/Shortcuts'
import { CozyConfirmDialogProvider } from 'cozy-harvest-lib'

class Home extends Component {
render() {
const { setAppsReady, wrapper } = this.props
return (
<Main className="u-flex-grow-1">
<ScrollToTopOnMount target={wrapper} />
<Content className="u-flex u-flex-column u-ph-1">
<Applications onAppsFetched={setAppsReady} />
<Services />
<Shortcuts />
<FooterLogo />
</Content>
<Route path="/connected/:konnectorSlug" component={Konnector} />
</Main>
<CozyConfirmDialogProvider>
<Main className="u-flex-grow-1">
<ScrollToTopOnMount target={wrapper} />
<Content className="u-flex u-flex-column u-ph-1">
<Applications onAppsFetched={setAppsReady} />
<Services />
<Shortcuts />
<FooterLogo />
</Content>
<Route path="/connected/:konnectorSlug" component={Konnector} />
</Main>
</CozyConfirmDialogProvider>
)
}
}
Expand Down

0 comments on commit a406026

Please sign in to comment.