diff --git a/src/blocks/AddToHome/indes.tsx b/src/blocks/AddToHome/indes.tsx index 242370f..af482dc 100644 --- a/src/blocks/AddToHome/indes.tsx +++ b/src/blocks/AddToHome/indes.tsx @@ -74,12 +74,14 @@ const AddToHome = ({ usage }: AddToHomeProps) => { {List.map((listPg) => ( - - {listPg.icon} - - {listPg.id}- {listPg.description} - - +
+ + {listPg.icon} + + {listPg.id}- {listPg.description} + + +
))} ); diff --git a/src/blocks/ApproveTransaction/index.tsx b/src/blocks/ApproveTransaction/index.tsx index d7a2119..43830bd 100644 --- a/src/blocks/ApproveTransaction/index.tsx +++ b/src/blocks/ApproveTransaction/index.tsx @@ -24,6 +24,7 @@ const ApproveTransaction = ({ onConfirm, data, }: ApproveType) => { + const [isLoaded, setIsLoaded] = useState(true); const account = useActiveAccount(); const operations = data.transaction?.operations; @@ -35,8 +36,6 @@ const ApproveTransaction = ({ data.network?.includes('main') || data.network === Networks.PUBLIC; - let isLoaded = true; - return ( <> @@ -55,7 +54,7 @@ const ApproveTransaction = ({ src={`https://logo.clearbit.com/${data.origin || ''}`} alt={data.origin || ' '} onError={() => { - isLoaded = false; + setIsLoaded(false); }} /> )} diff --git a/src/blocks/OfflineMode/index.tsx b/src/blocks/OfflineMode/index.tsx index 32b794f..994ebed 100644 --- a/src/blocks/OfflineMode/index.tsx +++ b/src/blocks/OfflineMode/index.tsx @@ -1,40 +1,30 @@ -import React, { useEffect } from 'react'; +import React from 'react'; import offline from 'public/images/offline.svg'; -// import config from 'src/config'; - import * as S from './styles'; -const OfflineMode = () => { - // useEffect(() => { - // setTimeout(() => { - // window.close(); - // }, config.OFFLINE_MODE_TIMEOUT_SECONDS * 1000); - // }, []); - - return ( -
- - - z - z - z - - rabet offline - - - You are offline - - Go back online to use Rabet - -
- ); -}; +const OfflineMode = () => ( +
+ + + z + z + z + + rabet offline + + + You are offline + + Go back online to use Rabet + +
+); export default OfflineMode; diff --git a/src/blocks/Op/Basic/Confirm/Layout.tsx b/src/blocks/Op/Basic/Confirm/Layout.tsx index 716d2b1..76bf013 100644 --- a/src/blocks/Op/Basic/Confirm/Layout.tsx +++ b/src/blocks/Op/Basic/Confirm/Layout.tsx @@ -2,7 +2,6 @@ import React from 'react'; // import { useNavigate } from 'react-router-dom'; import maxText from 'utils/maxText'; -import RouteName from 'staticRes/routes'; import Button from 'components/common/Button'; import CopyText from 'components/common/CopyText'; import useActiveAccount from 'hooks/useActiveAccount'; diff --git a/src/blocks/Op/Basic/SelectAsset/Search/index.tsx b/src/blocks/Op/Basic/SelectAsset/Search/index.tsx index 729941f..3160a0e 100644 --- a/src/blocks/Op/Basic/SelectAsset/Search/index.tsx +++ b/src/blocks/Op/Basic/SelectAsset/Search/index.tsx @@ -1,10 +1,9 @@ import { Horizon } from 'stellar-sdk'; -import React, { useState } from 'react'; +import React from 'react'; import Image from 'components/common/Image'; import formatBalance from 'utils/formatBalance'; import handleAssetAlt from 'utils/handleAssetAlt'; -import ScrollBar from 'components/common/ScrollBar'; import handleAssetsKeys from 'utils/handleAssetKeys'; import handleAssetImage from 'utils/handleAssetImage'; import useTypedSelector from 'hooks/useTypedSelector'; @@ -17,7 +16,6 @@ type AppProps = { close: () => void; onChange: (value: Horizon.BalanceLine) => void; valueName?: string; - maxHeight: number; }; const SearchAsset = ({ @@ -25,7 +23,6 @@ const SearchAsset = ({ close, onChange, valueName, - maxHeight, }: AppProps) => { const assetImages = useTypedSelector((store) => store.assetImages); diff --git a/src/blocks/Op/Basic/Send/AssetTrigger/index.tsx b/src/blocks/Op/Basic/Send/AssetTrigger/index.tsx index 30c1c93..3382aee 100644 --- a/src/blocks/Op/Basic/Send/AssetTrigger/index.tsx +++ b/src/blocks/Op/Basic/Send/AssetTrigger/index.tsx @@ -1,11 +1,9 @@ import React from 'react'; -import Image from 'next/image'; import { Horizon } from 'stellar-sdk'; import styled from 'styled-components'; import AngleDownBold from 'svgs/AngleDownBold'; import humanizeNumber from 'helpers/humanizeNumber'; -import questionLogo from 'public/images/question-circle.png'; import { AssetImage } from 'reducers/assetImages'; import handleAssetImage from 'utils/handleAssetImage'; import handleAssetAlt from 'utils/handleAssetAlt'; diff --git a/src/components/Error/index.tsx b/src/components/Error/index.tsx index 6d2c63a..f2db94e 100644 --- a/src/components/Error/index.tsx +++ b/src/components/Error/index.tsx @@ -2,10 +2,9 @@ import React from 'react'; import NoteCard from 'components/NoteCard'; import ExclamationTriangle from 'svgs/ExclamationTriangle'; -import styled from 'styled-components'; export type ErrorProps = { - message: string; + message: string | string[] | any; onClick: () => void; }; diff --git a/src/components/SendButton/index.tsx b/src/components/SendButton/index.tsx deleted file mode 100644 index 5b61dac..0000000 --- a/src/components/SendButton/index.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import React from 'react'; - -import { Usage } from 'models'; -import RouteName from 'staticRes/routes'; -// import { useNavigate } from 'react-router-dom'; -import Button from 'components/common/Button'; -import Confirm from 'blocks/Op/Advance/Confirm'; -import openModalAction from 'actions/modal/open'; -import closeModalAction from 'actions/modal/close'; -import useTypedSelector from 'hooks/useTypedSelector'; - -type SendButtonProps = { - usage: Usage; -}; - -const SendButton = ({ usage }: SendButtonProps) => { - // const navigate = useNavigate(); - const { operations, memo } = useTypedSelector( - (store) => store.transaction, - ); - - const handleClick = () => { - if (usage === 'desktop') { - openModalAction({ - isStyled: false, - title: '', - size: 'medium', - padding: 'large', - minHeight: 534, - children: ( - - ), - }); - } else { - // navigate(RouteName.Confirm); - } - }; - - let isDisabled = false; - - if (!operations.length) { - isDisabled = true; - } - - for (let i = 0; i < operations.length; i += 1) { - if (!operations[i].checked) { - isDisabled = true; - } - } - - if (memo.text && !memo.checked) { - isDisabled = true; - } - - return ( -