joy-election.ts 574 B

1234567891011121314151617
  1. import { Route } from './types';
  2. import Election from '@polkadot/joy-election/index';
  3. import SidebarSubtitle from '@polkadot/joy-election/SidebarSubtitle';
  4. export default function create (t: <T = string> (key: string, text: string, options: { ns: string }) => T): Route {
  5. return {
  6. Component: Election,
  7. display: {
  8. needsApi: ['query.council.activeCouncil', 'query.councilElection.stage']
  9. },
  10. text: t<string>('nav.election', 'Council', { ns: 'apps-routing' }),
  11. icon: 'university',
  12. name: 'council',
  13. SubtitleComponent: SidebarSubtitle
  14. };
  15. }