From b9a88dd7afd60483e24072fd7657130d7823b150 Mon Sep 17 00:00:00 2001 From: Crash-- Date: Thu, 4 Jan 2024 09:33:48 +0100 Subject: [PATCH] refactor: Remove unused files I forgot to remove theses files previoulsy. --- package.json | 1 - .../images/connecting-data-in-progress.svg | 1 - src/components/Banners/UpdateMessage.jsx | 66 ------ src/components/DescriptionContent.jsx | 48 ---- src/components/KonnectorErrors.jsx | 212 ------------------ src/components/KonnectorInstall.jsx | 97 -------- src/components/KonnectorMaintenance.jsx | 31 --- src/components/KonnectorSuccess.jsx | 153 ------------- src/components/ReactMarkdownWrapper.jsx | 17 -- .../services/CreateAccountService.jsx | 68 ------ src/containers/AccountConnection.jsx | 165 -------------- src/lib/konnectors.js | 8 - src/styles/descriptionContent.styl | 11 - .../components/Banners/UpdateMessage.spec.jsx | 38 ---- test/components/DescriptionContent.spec.js | 45 ---- test/components/ReactMarkdownWrapper.spec.jsx | 42 ---- .../DescriptionContent.spec.js.snap | 70 ------ .../ReactMarkdownWrapper.spec.jsx.snap | 41 ---- test/lib/konnectors.spec.js | 10 - yarn.lock | 2 +- 20 files changed, 1 insertion(+), 1125 deletions(-) delete mode 100644 src/assets/images/connecting-data-in-progress.svg delete mode 100644 src/components/Banners/UpdateMessage.jsx delete mode 100644 src/components/DescriptionContent.jsx delete mode 100644 src/components/KonnectorErrors.jsx delete mode 100644 src/components/KonnectorInstall.jsx delete mode 100644 src/components/KonnectorMaintenance.jsx delete mode 100644 src/components/KonnectorSuccess.jsx delete mode 100644 src/components/ReactMarkdownWrapper.jsx delete mode 100644 src/components/services/CreateAccountService.jsx delete mode 100644 src/containers/AccountConnection.jsx delete mode 100644 src/styles/descriptionContent.styl delete mode 100644 test/components/Banners/UpdateMessage.spec.jsx delete mode 100644 test/components/DescriptionContent.spec.js delete mode 100644 test/components/ReactMarkdownWrapper.spec.jsx delete mode 100644 test/components/__snapshots__/DescriptionContent.spec.js.snap delete mode 100644 test/components/__snapshots__/ReactMarkdownWrapper.spec.jsx.snap diff --git a/package.json b/package.json index fa2dc8a187..fe591a8bd2 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,6 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-inspector": "5.1.1", - "react-markdown": "4.3.1", "react-redux": "7.2.6", "react-remove-scroll": "^2.5.5", "react-router-dom": "6.6.2", diff --git a/src/assets/images/connecting-data-in-progress.svg b/src/assets/images/connecting-data-in-progress.svg deleted file mode 100644 index 3d63570e89..0000000000 --- a/src/assets/images/connecting-data-in-progress.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/Banners/UpdateMessage.jsx b/src/components/Banners/UpdateMessage.jsx deleted file mode 100644 index f72691fd4c..0000000000 --- a/src/components/Banners/UpdateMessage.jsx +++ /dev/null @@ -1,66 +0,0 @@ -import React, { useState, useCallback } from 'react' -import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n' -import Button from 'cozy-ui/transpiled/react/deprecated/Button' -import Infos from 'cozy-ui/transpiled/react/deprecated/Infos' -import Typography from 'cozy-ui/transpiled/react/Typography' -import PropTypes from 'prop-types' -import { useClient } from 'cozy-client' -import Intents from 'cozy-interapp' - -const UpdateMessage = props => { - const [isRedirecting, setIsRedirecting] = useState(false) - const { t } = useI18n() - const { isBlocking, konnector } = props - const client = useClient() - const intents = new Intents({ client }) - const handleRedirectToStore = useCallback(async () => { - setIsRedirecting(true) - - try { - await intents.redirect('io.cozy.apps', { - slug: konnector.slug, - step: 'update' - }) - } catch (error) { - /* eslint-disable-next-line no-console */ - console.error(error) - setIsRedirecting(false) - } - }, [konnector]) - - return ( - - - {t('update.title')} - - - {isBlocking ? t('update.blocking') : t('update.regular')} - - - } - action={ -