Skip to content

Commit

Permalink
refactor: decouple nested components (#3353)
Browse files Browse the repository at this point in the history
Co-authored-by: therealemjy <[email protected]>
  • Loading branch information
therealemjy and therealemjy authored Oct 8, 2024
1 parent a288307 commit 56dbc43
Show file tree
Hide file tree
Showing 21 changed files with 16 additions and 233 deletions.
5 changes: 5 additions & 0 deletions .changeset/chatty-mails-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@venusprotocol/evm": patch
---

decouple nested components
2 changes: 1 addition & 1 deletion apps/evm/src/components/ActiveVotingProgress/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { theme } from 'theme';
import type { Token } from 'types';
import { convertMantissaToTokens } from 'utilities';

import { LabeledProgressBar } from '../ProgressBar/LabeledProgressBar';
import { LabeledProgressBar } from '../LabeledProgressBar';
import { useStyles } from './styles';

interface ActiveVotingProgressProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface ApprovalStepsProps {
secondStepButtonLabel: string;
}

interface AprrovalStepsExtraProps {
interface ApprovalStepsExtraProps {
approvalAction: () => Promise<unknown>;
showApprovalSteps: boolean;
isApprovalActionLoading: boolean;
Expand All @@ -25,7 +25,7 @@ interface AprrovalStepsExtraProps {
secondStepLabel: string;
}

export const ApprovalSteps: React.FC<ApprovalStepsProps & AprrovalStepsExtraProps> = ({
export const ApprovalSteps: React.FC<ApprovalStepsProps & ApprovalStepsExtraProps> = ({
approvalAction,
showApprovalSteps,
isApprovalActionLoading,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useTranslation } from 'libs/translations';

import { ApprovalSteps, type ApprovalStepsProps } from '..';
import { ApprovalSteps, type ApprovalStepsProps } from '../ApprovalSteps';

export type ApproveDelegateStepsProps = {
approveDelegateeAction: () => Promise<unknown>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useTranslation } from 'libs/translations';
import type { Token } from 'types';

import { ApprovalSteps, type ApprovalStepsProps } from '..';
import { ApprovalSteps, type ApprovalStepsProps } from '../ApprovalSteps';

export type ApproveTokenStepsProps = {
token: Token;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

70 changes: 0 additions & 70 deletions apps/evm/src/components/SuccessfulTransactionModal/index.tsx

This file was deleted.

47 changes: 0 additions & 47 deletions apps/evm/src/components/SuccessfulTransactionModal/styles.ts

This file was deleted.

12 changes: 6 additions & 6 deletions apps/evm/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ export * from './Chip';
export * from './Countdown';
export * from './Delimiter';
export * from './EllipseAddress';
export * from './ApproveSteps/ApproveTokenSteps';
export * from './ApproveSteps/ApproveDelegateSteps';
export * from './ApproveTokenSteps';
export * from './ApproveDelegateSteps';
export * from './ApprovalSteps';
export * from './Form';
export * from './Icon';
export * from './LabeledInlineContent';
Expand All @@ -21,12 +22,11 @@ export * from './ProgressBar';
export * from './ProgressCircle';
export * from './ProposalCard';
export * from './Card';
export * from './ProgressBar/AccountHealth';
export * from './ProgressBar/PercentageRepresentation';
export * from './ProgressBar/LabeledProgressBar';
export * from './ProgressBar';
export * from './AccountHealth';
export * from './LabeledProgressBar';
export * from './Select';
export * from './Spinner';
export * from './SuccessfulTransactionModal';
export * from './Table';
export * from './Tabs';
export * from './TextField';
Expand Down
7 changes: 0 additions & 7 deletions apps/evm/src/hooks/__mocks__/useSuccessfulTransactionModal.ts

This file was deleted.

0 comments on commit 56dbc43

Please sign in to comment.