-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor steps to be more deterministic
- Loading branch information
1 parent
3f7909e
commit 45ed2a7
Showing
9 changed files
with
157 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
/** | ||
* Accepts pool configuration as props | ||
*/ | ||
export const StepsDisplay = ({ currentStep }: { currentStep: number }) => { | ||
export const StepsDisplay = ({ state }: { state: any }) => { | ||
return ( | ||
<ul className="steps steps-vertical sm:steps-horizontal sm:w-[555px] bg-base-200 py-4 rounded-xl shadow-md"> | ||
<li className="px-5 sm:px-0 step step-accent">Create </li> | ||
<li className={`px-5 sm:px-0 step ${currentStep > 1 && "step-accent"}`}>Approve </li> | ||
<li className={`px-5 sm:px-0 step ${currentStep > 2 && "step-accent"}`}>Add Liquidity</li> | ||
<li className={`px-5 sm:px-0 step ${currentStep > 3 && "step-accent"}`}>Set Fee</li> | ||
<li className={`px-5 sm:px-0 step ${currentStep > 4 && "step-accent"}`}>Finalize</li> | ||
</ul> | ||
<div className="bg-base-200 px-5 pt-5 rounded-xl shadow-md"> | ||
<h5 className="text-xl font-bold text-center">Steps</h5> | ||
<ul className="steps steps-vertical"> | ||
<li className="step step-accent">Create </li> | ||
<li className={`step ${state.step > 1 && "step-accent"}`}>Approve {state.token1.symbol}</li> | ||
<li className={`step ${state.step > 2 && "step-accent"}`}>Approve {state.token2.symbol}</li> | ||
<li className={`step ${state.step > 3 && "step-accent"}`}>Add {state.token1.symbol}</li> | ||
<li className={`step ${state.step > 4 && "step-accent"}`}>Add {state.token2.symbol}</li> | ||
<li className={`step ${state.step > 5 && "step-accent"}`}>Set Fee</li> | ||
<li className={`step ${state.step > 6 && "step-accent"}`}>Finalize</li> | ||
</ul> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.