on 4c8c607 help sign in
bridge/src/views/Senate.js
41 lines 1.2 kB history raw
1import React, { useCallback, useState } from 'react';
2import { Grid } from 'indigo-react';
3import { azimuth } from 'azimuth-js';
5import View from 'components/View';
6import ViewHeader from 'components/ViewHeader';
7import { ForwardButton } from 'components/Buttons';
9import { useLocalRouter } from 'lib/LocalRouter';
11export default function Point() {
12 const { pop, push, names } = useLocalRouter();
14 //TODO if we moved the poll fetching logic into a cache/store,
15 // we could be cute here and display "x ongoing" under the buttons.
17 const goDocuments = useCallback(() => push(names.DOCUMENTS), [push, names]);
19 const goUpgrades = useCallback(() => push(names.UPGRADES), [push, names]);
21 return (
22 <View pop={pop} inset>
23 <Grid.Item full as={ViewHeader}>
24 Senate: Proposals
25 </Grid.Item>
26 <Grid className="pt2">
27 <Grid.Item
28 full
29 as={ForwardButton}
30 className="mt1"
31 onClick={goDocuments}>
32 Document Proposals
33 </Grid.Item>
34 <Grid.Divider />
35 <Grid.Item full as={ForwardButton} className="mt1" onClick={goUpgrades}>
36 Upgrade Proposals
37 </Grid.Item>
38 </Grid>
39 </View>
40 );