Fix: "Back to community" button navigation in Lite proposal details #922
Open
ashutoshpw wants to merge 3 commits intomasterfrom
Open
Fix: "Back to community" button navigation in Lite proposal details #922ashutoshpw wants to merge 3 commits intomasterfrom
ashutoshpw wants to merge 3 commits intomasterfrom
Conversation
✅ Deploy Preview for tezos-homebase ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull Request Overview
This PR implements navigation improvements for lite proposals to handle navigation back to the correct DAO view (V3 vs. lite). The changes enable proper routing context by passing the daoId through the navigation state.
- Adds conditional navigation logic to
ProposalDetailscomponent to route back to V3 DAO view when coming from a V3 DAO - Passes
daoIdprop through the component chain to enable proper state management - Updates Node.js version in
.nvmrcfrom v18.20.0 to v22.11.0
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/modules/lite/explorer/pages/ProposalDetails/index.tsx | Adds conditional navigation logic to route to full DAO view when daoId is present in state |
| src/modules/explorer/pages/Proposals/index.tsx | Passes daoId prop to ProposalsList component for off-chain proposals |
| src/modules/explorer/components/ProposalsList.tsx | Adds daoId prop to interface and passes it to ProposalTableRow component |
| .nvmrc | Updates Node.js version from v18.20.0 to v22.11.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
The "Back to community" button in Lite proposal details was always navigating to the Lite DAO view, even when users accessed the proposal from a V3 DAO's Off-Chain proposals tab. This created a confusing user experience where clicking the back button would take users to a different DAO interface than they started from.
Navigation flow before fix:
Solution
This PR fixes the navigation by passing context about the originating DAO through React Router's location state. When a user navigates to a lite proposal from a V3 DAO, we now track the V3 DAO's ID and use it to navigate back to the correct view.
Navigation flow after fix:
Fixes #916