-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for searching for network proposal by name #1192
Conversation
Deployed to Cloudflare Pages
|
fbd459d
to
8c93b63
Compare
We decided to create the proposal details page first, so that we can link to them. When it's ready, I will revisit this one. |
Proposal details page coming at #1202. So This PR is now waiting for that one. |
8c93b63
to
f47d7c6
Compare
82737b8
to
5ad87c1
Compare
Rebased on top of the merged proposal details page; so we can not link and redirect to proposals from search results. |
5ad87c1
to
dfbdc42
Compare
@@ -854,6 +855,23 @@ export const useGetConsensusProposalsProposalId: typeof generated.useGetConsensu | |||
}) | |||
} | |||
|
|||
export const useGetConsensusProposalsByName = (network: Network, nameFragment: string | undefined) => { | |||
const query = useGetConsensusProposals(network, {}, { query: { enabled: !!nameFragment } }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(related: #226)
Are we Ok with releasing this on prod when Consensus layer is not enabled? Should we disabled this type of search results? |
That shouldn't be an issue, since we are launching the search for proposals like this: explorer/src/app/pages/SearchResultsPage/hooks.ts Lines 177 to 182 in dfbdc42
In other words, we will only search networks where the consensus layer is enabled. |
The searching happens on the client side, since Nexus has no support for it.