feat(#1012): rejected proposals page enum change (#1118)

* Feat/1012: Rejected proposals page

* Feat/1012: Test for rejected proposals link on main proposals list

* Feat/1012: Translate 'see rejected proposals' link

* Feat/1012: Updated rejected proposals page with new enum

* chore: use proposalState enum

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
This commit is contained in:
Sam Keen 2022-08-23 18:22:10 +01:00 committed by GitHub
parent 9979c25a13
commit bb40a18e2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@ import { PROPOSALS_QUERY } from '../proposals';
import { SplashLoader } from '../../../components/splash-loader';
import { RejectedProposalsList } from '../components/proposals-list';
import type { Proposals } from '../proposals/__generated__/Proposals';
import { ProposalState } from '@vegaprotocol/types';
export const RejectedProposalsContainer = () => {
const { t } = useTranslation();
@ -26,7 +27,8 @@ export const RejectedProposalsContainer = () => {
return flow([
compact,
(arr) => filter(arr, ({ state }) => state === 'Rejected'),
(arr) =>
filter(arr, ({ state }) => state === ProposalState.STATE_REJECTED),
(arr) =>
orderBy(
arr,