Skip to content

Commit

Permalink
feat: Deals with breaking change from [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
cballevre committed Nov 29, 2024
1 parent eda5897 commit f1982fa
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/Konnector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useLocation, useNavigate, useParams } from 'react-router-dom'

import datacardOptions from 'cozy-harvest-lib/dist/datacards/datacardOptions'
import log from 'cozy-logger'
import { Routes as HarvestRoutes } from 'cozy-harvest-lib'
import { HarvestRoutes } from 'cozy-harvest-lib'

import { closeApp, openApp } from 'hooks/useOpenApp'
import { getKonnector } from 'ducks/konnectors'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Konnector.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { StatelessKonnector } from './Konnector'
import { act } from 'react-dom/test-utils'

jest.mock('cozy-harvest-lib', () => ({
Routes: ({ konnector, triggers, onDismiss }) => (
HarvestRoutes: ({ konnector, triggers, onDismiss }) => (
<div konnector={konnector} triggers={triggers} onClick={onDismiss}>
{konnector.slug}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/App.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jest.mock('cozy-device-helper', () => ({
}))

jest.mock('cozy-harvest-lib', () => ({
Routes: ({ konnector, triggers, onDismiss }) => (
HarvestRoutes: ({ konnector, triggers, onDismiss }) => (
<div konnector={konnector} triggers={triggers} onClick={onDismiss}>
{konnector.slug}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { useEffect, useState } from 'react'
import { Routes } from 'cozy-harvest-lib'
import { HarvestRoutes } from 'cozy-harvest-lib'
import { useParams } from 'react-router-dom'
import CozyTheme from 'cozy-ui/transpiled/react/providers/CozyTheme'
import { useClient } from 'cozy-client'
import Intents from 'cozy-interapp'
import datacardOptions from 'cozy-harvest-lib/dist/datacards/datacardOptions'

export const HarvestRoutes = ({ intentData, intentId }) => {
export const KonnectorRoutes = ({ intentData, intentId }) => {
const { konnectorSlug } = useParams()
const client = useClient()

Expand All @@ -22,7 +22,7 @@ export const HarvestRoutes = ({ intentData, intentId }) => {

return (
<CozyTheme variant="normal">
<Routes
<HarvestRoutes
konnectorRoot={`/${konnectorSlug}`}
konnectorSlug={konnectorSlug}
onDismiss={() => (service ? service.cancel() : undefined)}
Expand Down
4 changes: 2 additions & 2 deletions src/targets/intents/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import IconSprite from 'cozy-ui/transpiled/react/Icon/Sprite'

import IntentHandler from 'containers/IntentHandler'
import AppWrapper, { AppContext } from 'components/AppWrapper'
import { HarvestRoutes } from './HarvestRoute'
import { KonnectorRoutes } from './KonnectorRoutes'

document.addEventListener('DOMContentLoaded', () => {
const container = document.querySelector('[role=application]')
Expand All @@ -29,7 +29,7 @@ document.addEventListener('DOMContentLoaded', () => {
<Route
path=":konnectorSlug/*"
element={
<HarvestRoutes intentData={data} intentId={intentId} />
<KonnectorRoutes intentData={data} intentId={intentId} />
}
/>
</Routes>
Expand Down

0 comments on commit f1982fa

Please sign in to comment.