From 7d89ecb18551af1835637c09e669495dc04e77be Mon Sep 17 00:00:00 2001 From: leppaludi <105874219+leppaludi@users.noreply.github.com> Date: Sun, 25 Feb 2024 22:39:18 +0000 Subject: [PATCH] reset selectedNFTs when back is clicked --- .../StepNavigation/StepNavigation.svelte | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/bridge-ui/src/components/Bridge/NFTBridgeComponents/StepNavigation/StepNavigation.svelte b/packages/bridge-ui/src/components/Bridge/NFTBridgeComponents/StepNavigation/StepNavigation.svelte index 64548e0b771..04819ffef66 100644 --- a/packages/bridge-ui/src/components/Bridge/NFTBridgeComponents/StepNavigation/StepNavigation.svelte +++ b/packages/bridge-ui/src/components/Bridge/NFTBridgeComponents/StepNavigation/StepNavigation.svelte @@ -39,7 +39,10 @@ }; const handlePreviousStep = () => { - if (activeStep === BridgeSteps.REVIEW) { + if (activeStep === BridgeSteps.IMPORT) { + $selectedNFTs = []; + $selectedImportMethod = ImportMethod.NONE; + } else if (activeStep === BridgeSteps.REVIEW) { activeStep = BridgeSteps.IMPORT; } else if (activeStep === BridgeSteps.CONFIRM) { activeStep = BridgeSteps.REVIEW; @@ -65,7 +68,9 @@ <span class="body-bold">{nextStepButtonText}</span> </ActionButton> - <StepBack on:click={() => ($selectedImportMethod = ImportMethod.NONE)}>{$t('common.back')}</StepBack> + <StepBack on:click={() => handlePreviousStep()}> + {$t('common.back')} + </StepBack> {/if} {/if} {#if activeStep === BridgeSteps.REVIEW}