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

fix: remove lock calculator when not needed and improve button behavior #500

Merged
merged 1 commit into from
Jan 21, 2025
Merged
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
8 changes: 5 additions & 3 deletions src/components/veYFI-calculator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,10 @@ const VeYFICalculator: React.FC = () => {
<Button
onClick={handleCalculateButton1Click}
disabled={
!selectedVault || isNaN(Number(veYFIAmount)) || !veYFIAmount
!selectedVault ||
(useVeYfiCalculator
? isNaN(Number(veYFIFromLock)) || !veYFIFromLock
: isNaN(Number(veYFIAmount)) || !veYFIAmount)
}
>
Calculate
Expand All @@ -597,6 +600,7 @@ const VeYFICalculator: React.FC = () => {
</div>
)}
</Card>
<VeYFILockCalculator onVeYFIChange={handleVeYFICalcChange} />
</TabsContent>
<TabsContent value="tab2">
<Card>
Expand Down Expand Up @@ -712,8 +716,6 @@ const VeYFICalculator: React.FC = () => {
)}
</Card>
</TabsContent>
{/* Integrate the new VeYFILockCalculator component */}
<VeYFILockCalculator onVeYFIChange={handleVeYFICalcChange} />
</Tabs>
</div>
)
Expand Down
Loading