Skip to content

Commit

Permalink
feat: Use search from dataproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
zatteo committed Dec 13, 2024
1 parent 7cb8220 commit f03a55a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
17 changes: 10 additions & 7 deletions src/components/App/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from 'react'
import { Provider } from 'react-redux'

import { BarProvider } from 'cozy-bar'
import { DataProxyProvider } from 'cozy-dataproxy-lib'
import { WebviewIntentProvider } from 'cozy-intent'

import PushBannerProvider from 'components/PushBanner/PushBannerProvider'
Expand All @@ -25,13 +26,15 @@ const App = ({ isPublic, store, client, lang, polyglot, children }) => {
<BarProvider>
<Provider store={store}>
<DriveProvider client={client} lang={lang} polyglot={polyglot}>
<PushBannerProvider>
<AcceptingSharingProvider>
<ThumbnailSizeContextProvider>
<ModalContextProvider>{children}</ModalContextProvider>
</ThumbnailSizeContextProvider>
</AcceptingSharingProvider>
</PushBannerProvider>
<DataProxyProvider>
<PushBannerProvider>
<AcceptingSharingProvider>
<ThumbnailSizeContextProvider>
<ModalContextProvider>{children}</ModalContextProvider>
</ThumbnailSizeContextProvider>
</AcceptingSharingProvider>
</PushBannerProvider>
</DataProxyProvider>
</DriveProvider>
</Provider>
</BarProvider>
Expand Down
15 changes: 10 additions & 5 deletions src/modules/search/components/AppBarSearch.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import React from 'react'

import { BarSearch } from 'cozy-bar'
import { AssistantDesktop } from 'cozy-dataproxy-lib'
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'

import BarSearchAutosuggest from 'modules/search/components/BarSearchAutosuggest'

const AppBarSearch = () => {
const { t } = useI18n()
const { isMobile } = useBreakpoints()

return <BarSearch>{!isMobile && <BarSearchAutosuggest t={t} />}</BarSearch>
return (
<BarSearch>
{!isMobile && (
<AssistantDesktop
componentsProps={{ SearchBarDesktop: { size: 'small' } }}
/>
)}
</BarSearch>
)
}

export default AppBarSearch

0 comments on commit f03a55a

Please sign in to comment.