Skip to content

Commit

Permalink
Merge pull request #586 from bandada-infra/fix/dashboard-on-chain-back
Browse files Browse the repository at this point in the history
Fix create on-chain group back button
  • Loading branch information
vplasencia authored Oct 27, 2024
2 parents ac80860 + 09812f1 commit 0d3482c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion apps/dashboard/src/pages/new-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ export default function NewGroupPage(): JSX.Element {
}
}, [])

const finalPreviewBack = useCallback(() => {
if (_group.type === "on-chain") {
setGroup({ type: "off-chain", fingerprintDuration: 3600 })
setCurrentStep(0)
} else {
setCurrentStep(_currentStep - 1)
}
}, [_group, _currentStep])

return (
<Container maxW="container.xl" px="8" pb="20">
<VStack spacing="9" flex="1">
Expand Down Expand Up @@ -85,7 +94,7 @@ export default function NewGroupPage(): JSX.Element {
) : (
<FinalPreviewStep
group={_group}
onBack={() => setCurrentStep(_currentStep - 1)}
onBack={() => finalPreviewBack()}
/>
)}
</HStack>
Expand Down

0 comments on commit 0d3482c

Please sign in to comment.