Skip to content

Commit

Permalink
feat: removed temporary restart flow button
Browse files Browse the repository at this point in the history
  • Loading branch information
Polybius93 committed Dec 8, 2023
1 parent 2e59edd commit ce32a44
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 41 deletions.
10 changes: 1 addition & 9 deletions src/app/components/mint-unmint/components/mint/mint.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { useDispatch, useSelector } from 'react-redux';
import { useSelector } from 'react-redux';

import { HStack } from '@chakra-ui/react';
import { StepButton } from '@components/step-button/step-button';
import { RootState } from '@store/index';
import { mintUnmintActions } from '@store/slices/mintunmint/mintunmint.actions';

import { LockScreen } from '../lock-screen/lock-screen';
import { ProgressTimeline } from '../progress-timeline/progress-timeline';
Expand All @@ -13,13 +11,8 @@ import { Walkthrough } from '../walkthrough/walkthrough';
import { MintLayout } from './components/mint.layout';

export function Mint(): React.JSX.Element {
const dispatch = useDispatch();
const { mintStep } = useSelector((state: RootState) => state.mintunmint);

function handleRestart() {
dispatch(mintUnmintActions.setMintStep([0, '']));
}

return (
<MintLayout>
<ProgressTimeline variant={'mint'} currentStep={mintStep[0]} />
Expand All @@ -31,7 +24,6 @@ export function Mint(): React.JSX.Element {
<TransactionSummary currentStep={mintStep} flow={'mint'} blockchain={'ethereum'} />
)}
</HStack>
<StepButton handleClick={handleRestart} />
</MintLayout>
);
}
10 changes: 1 addition & 9 deletions src/app/components/mint-unmint/components/unmint/unmint.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { useDispatch, useSelector } from 'react-redux';
import { useSelector } from 'react-redux';

import { HStack } from '@chakra-ui/react';
import { StepButton } from '@components/step-button/step-button';
import { RootState } from '@store/index';
import { mintUnmintActions } from '@store/slices/mintunmint/mintunmint.actions';

import { ProgressTimeline } from '../progress-timeline/progress-timeline';
import { TransactionSummary } from '../transaction-summary/transaction-summary';
Expand All @@ -12,13 +10,8 @@ import { UnmintVaultSelector } from './components/unmint-vault-selector';
import { UnmintLayout } from './components/unmint.layout';

export function Unmint(): React.JSX.Element {
const dispatch = useDispatch();
const { unmintStep } = useSelector((state: RootState) => state.mintunmint);

function handleRestart() {
dispatch(mintUnmintActions.setUnmintStep(0));
}

return (
<UnmintLayout>
<ProgressTimeline variant={'unmint'} currentStep={unmintStep[0]} />
Expand All @@ -29,7 +22,6 @@ export function Unmint(): React.JSX.Element {
<TransactionSummary currentStep={unmintStep} flow={'unmint'} blockchain={'bitcoin'} />
)}
</HStack>
<StepButton handleClick={handleRestart} />
</UnmintLayout>
);
}
21 changes: 0 additions & 21 deletions src/app/components/step-button/step-button.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions src/app/store/slices/mintunmint/mintunmint.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ interface MintUnmintState {
}

const initialMintUnmintState: MintUnmintState = {
mintStep: [2, ''],
unmintStep: [1, ''],
mintStep: [0, ''],
unmintStep: [0, ''],
activeTab: 0,
};

Expand Down

0 comments on commit ce32a44

Please sign in to comment.