Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove: unused import, constant condition and empty block. #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/blocks/AddToHome/indes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@ const AddToHome = ({ usage }: AddToHomeProps) => {
<S.Hr />

{List.map((listPg) => (
<S.List listId={listPg.id}>
<span>{listPg.icon}</span>
<S.Item className={listPg.margin}>
{listPg.id}- {listPg.description}
</S.Item>
</S.List>
<div key={listPg.id}>
<S.List listId={listPg.id}>
<span>{listPg.icon}</span>
<S.Item className={listPg.margin}>
{listPg.id}- {listPg.description}
</S.Item>
</S.List>
</div>
))}
</div>
);
Expand Down
5 changes: 2 additions & 3 deletions src/blocks/ApproveTransaction/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const ApproveTransaction = ({
onConfirm,
data,
}: ApproveType) => {
const [isLoaded, setIsLoaded] = useState(true);
const account = useActiveAccount();

const operations = data.transaction?.operations;
Expand All @@ -35,8 +36,6 @@ const ApproveTransaction = ({
data.network?.includes('main') ||
data.network === Networks.PUBLIC;

let isLoaded = true;

return (
<>
<S.TopContainer>
Expand All @@ -55,7 +54,7 @@ const ApproveTransaction = ({
src={`https://logo.clearbit.com/${data.origin || ''}`}
alt={data.origin || ' '}
onError={() => {
isLoaded = false;
setIsLoaded(false);
}}
/>
)}
Expand Down
56 changes: 23 additions & 33 deletions src/blocks/OfflineMode/index.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className="flex justify-center items-center h-screen w-screen">
<S.Container>
<S.Sleeping>
<S.Z>z</S.Z>
<S.Z1>z</S.Z1>
<S.Z2>z</S.Z2>

<img
src={offline.src}
width={69}
height={143}
alt="rabet offline"
/>
</S.Sleeping>

<S.Title>You are offline</S.Title>

<S.Msg>Go back online to use Rabet</S.Msg>
</S.Container>
</div>
);
};
const OfflineMode = () => (
<div className="flex justify-center items-center h-screen w-screen">
<S.Container>
<S.Sleeping>
<S.Z>z</S.Z>
<S.Z1>z</S.Z1>
<S.Z2>z</S.Z2>

<img
src={offline.src}
width={69}
height={143}
alt="rabet offline"
/>
</S.Sleeping>

<S.Title>You are offline</S.Title>

<S.Msg>Go back online to use Rabet</S.Msg>
</S.Container>
</div>
);

export default OfflineMode;
1 change: 0 additions & 1 deletion src/blocks/Op/Basic/Confirm/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
5 changes: 1 addition & 4 deletions src/blocks/Op/Basic/SelectAsset/Search/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -17,15 +16,13 @@ type AppProps = {
close: () => void;
onChange: (value: Horizon.BalanceLine) => void;
valueName?: string;
maxHeight: number;
};

const SearchAsset = ({
assets,
close,
onChange,
valueName,
maxHeight,
}: AppProps) => {
const assetImages = useTypedSelector((store) => store.assetImages);

Expand Down
2 changes: 0 additions & 2 deletions src/blocks/Op/Basic/Send/AssetTrigger/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 1 addition & 2 deletions src/components/Error/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
66 changes: 0 additions & 66 deletions src/components/SendButton/index.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/helpers/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export const get = <T>(key: string, password?: string): Promise<T> =>

return resolve(jsonData);
}
} else {
}
} else {
resolve(null);
Expand Down