Skip to content

Conversation

@ashutoshpw
Copy link
Collaborator

@ashutoshpw ashutoshpw commented Oct 24, 2025

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:

V3 DAO (/explorer/dao/{daoId}) 
  → Click Off-Chain Proposal 
  → Lite Proposal Details
  → Click "Back to community"
  → ❌ Always redirects to Lite DAO view (/explorer/lite/dao/{id}/community)

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:

V3 DAO → Off-Chain Proposal → Click "Back to community" → ✅ Returns to V3 DAO
Lite DAO → Proposal → Click "Back to community" → ✅ Returns to Lite DAO

Fixes #916

@netlify
Copy link

netlify bot commented Oct 24, 2025

Deploy Preview for tezos-homebase ready!

Name Link
🔨 Latest commit f92b6f4
🔍 Latest deploy log https://app.netlify.com/projects/tezos-homebase/deploys/692f0543d9c70e00083389b4
😎 Deploy Preview https://deploy-preview-922--tezos-homebase.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 30 (🟢 up 1 from production)
Accessibility: 91 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@ashutoshpw ashutoshpw marked this pull request as ready for review November 3, 2025 19:41
Copilot AI review requested due to automatic review settings November 3, 2025 19:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ProposalDetails component to route back to V3 DAO view when coming from a V3 DAO
  • Passes daoId prop through the component chain to enable proper state management
  • Updates Node.js version in .nvmrc from 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.

@ashutoshpw ashutoshpw changed the title Fix: "Back to community" button navigation in Lite proposal details #30 Fix: "Back to community" button navigation in Lite proposal details Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Faulty navigation on "Back to community" button

2 participants