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