Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.20.0
v22.11.0
6 changes: 4 additions & 2 deletions src/modules/explorer/components/ProposalsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ interface Props {
proposalStyle?: any
showFullList?: boolean
filters: undefined | Filters
daoId?: string
}

interface ProposalObj {
Expand All @@ -53,7 +54,8 @@ export const ProposalsList: React.FC<Props> = ({
liteProposals,
proposalStyle,
showFullList = true,
filters = undefined
filters = undefined,
daoId
}) => {
const [currentPage, setCurrentPage] = useState(0)
const [offset, setOffset] = useState(0)
Expand Down Expand Up @@ -196,7 +198,7 @@ export const ProposalsList: React.FC<Props> = ({
</CustomGrid>
) : (
<div style={{ width: "inherit", marginBottom: 16 }} key={`poll-${i}`}>
<ProposalTableRow poll={p.proposal} />
<ProposalTableRow poll={p.proposal} daoId={daoId} />
</div>
)
)}
Expand Down
1 change: 1 addition & 0 deletions src/modules/explorer/pages/Proposals/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ const TezosProposals = () => {
proposals={undefined}
liteProposals={polls}
filters={filters}
daoId={daoId}
/>
)}
{!(polls && polls.length > 0) ? (
Expand Down
10 changes: 8 additions & 2 deletions src/modules/lite/explorer/pages/ProposalDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,14 @@ export const ProposalDetails: React.FC<{ id: string }> = ({ id }) => {
if (historyLength > 1) {
navigate.goBack()
} else {
const daoUrl = pathname?.replace(`proposal/${proposalId}`, "")
navigate.push(daoUrl)
// If daoId is provided in state, user came from a V3 DAO, navigate to full DAO view
if (state?.daoId) {
navigate.push(`/explorer/dao/${state.daoId}`)
} else {
// Otherwise, navigate to lite DAO view
const daoUrl = pathname?.replace(`proposal/${proposalId}`, "")
navigate.push(daoUrl)
}
}
}

Expand Down
Loading