From fdcb476308ece3646af167b61dba85922982225b Mon Sep 17 00:00:00 2001 From: hasan-deriv Date: Thu, 15 Aug 2024 16:05:10 +0800 Subject: [PATCH] feat: remove unused loading component --- .../templates/_common/components/loading.tsx | 23 ---------- .../src/templates/app/components/loading.jsx | 46 ------------------- 2 files changed, 69 deletions(-) delete mode 100644 packages/cfd/src/templates/_common/components/loading.tsx delete mode 100644 packages/cfd/src/templates/app/components/loading.jsx diff --git a/packages/cfd/src/templates/_common/components/loading.tsx b/packages/cfd/src/templates/_common/components/loading.tsx deleted file mode 100644 index f3b3f944bfe0..000000000000 --- a/packages/cfd/src/templates/_common/components/loading.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import classNames from 'classnames'; -import React from 'react'; - -type LoadingProps = { - className?: string; - is_invisible?: boolean; - theme?: string; - id?: string; -}; - -const Loading = ({ className, is_invisible, theme, id }: LoadingProps) => ( -
- {Array.from(new Array(5)).map((x, inx) => ( -
- ))} -
-); - -export default Loading; diff --git a/packages/cfd/src/templates/app/components/loading.jsx b/packages/cfd/src/templates/app/components/loading.jsx deleted file mode 100644 index 0b55b98641f0..000000000000 --- a/packages/cfd/src/templates/app/components/loading.jsx +++ /dev/null @@ -1,46 +0,0 @@ -import classNames from 'classnames'; -import React from 'react'; -import PropTypes from 'prop-types'; -import { Text } from '@deriv/components'; - -const Loading = ({ className, id, is_fullscreen = true, is_slow_loading, status, theme }) => { - const theme_class = theme ? `barspinner-${theme}` : 'barspinner-light'; - return ( -
-
- {Array.from(new Array(5)).map((x, inx) => ( -
- ))} -
- {is_slow_loading && - status.map((text, inx) => ( - - {text} - - ))} -
- ); -}; - -Loading.propTypes = { - className: PropTypes.string, - id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - is_fullscreen: PropTypes.bool, - is_slow_loading: PropTypes.bool, - status: PropTypes.array, - theme: PropTypes.string, -}; -export default Loading;