@@ -1,20 +1,12 @@
1import { Just, Nothing } from 'folktale/maybe';
1import { Just, Nothing } from 'folktale/maybe';
2import React from 'react';
2import React from 'react';
3−import { pour } from 'sigil-js';
4−import * as ob from 'urbit-ob';
5import * as azimuth from 'azimuth-js';
3import * as azimuth from 'azimuth-js';
6import * as need from '../lib/need';
4import * as need from '../lib/need';
8−import PointList from '../components/PointList';
9−import ReactSVGComponents from '../components/ReactSVGComponents';
10−import KeysAndMetadata from './Point/KeysAndMetadata';
11−import Actions from './Point/Actions';
12−import { Row, Col, H1, H3 } from '../components/Base';
6+import { Row, Col, P } from '../components/Base';
14import { compose } from '../lib/lib';
8import { compose } from '../lib/lib';
15−import { ROUTE_NAMES } from '../lib/routeNames';
17−import { withHistory } from '../store/history';
18import { withNetwork } from '../store/network';
10import { withNetwork } from '../store/network';
19import { withPointCursor } from '../store/pointCursor';
11import { withPointCursor } from '../store/pointCursor';
20import { withPointCache } from '../store/pointCache';
12import { withPointCache } from '../store/pointCache';
@@ -70,7 +62,7 @@ class PointHome extends React.Component {
73− async updateBirthday(blockNumber) {
65+ async updateBirthday() {
74 const birthBlock = await azimuth.azimuth.getActivationBlock(
66 const birthBlock = await azimuth.azimuth.getActivationBlock(
75 need.contracts(this.props),
67 need.contracts(this.props),
76 need.pointCursor(this.props)
68 need.pointCursor(this.props)
@@ -79,6 +71,7 @@ class PointHome extends React.Component {
79 this.setState({ birthday: Nothing() });
71 this.setState({ birthday: Nothing() });
81 const block = await need.web3(this.props).eth.getBlock(birthBlock);
73 const block = await need.web3(this.props).eth.getBlock(birthBlock);
74+ //TODO add to point cache
82 this.setState({ birthday: Just(new Date(block.timestamp * 1000)) });
75 this.setState({ birthday: Just(new Date(block.timestamp * 1000)) });
@@ -97,43 +90,14 @@ class PointHome extends React.Component {
99 render() {
92 render() {
100− const { web3, history, wallet, setPointCursor, pointCache } = this.props;
102− const point = need.pointCursor(this.props);
104− const pointDetails =
105− point in pointCache ? Just(pointCache[point]) : Nothing();
107− const name = ob.patp(point);
109− const sigil = pour({
111− renderer: ReactSVGComponents,
115− const online = Just.hasInstance(web3);
117− const authenticated = Just.hasInstance(wallet);
122− <div className={'mt-12 pt-6'}>{sigil}</div>
96+ <P>Admin</P>
124− <code>{name}</code>
98+ <P>Boot Arvo</P>
126− {authenticated ? (
100+ <P>Invite</P>
131− pointDetails={pointDetails}
132− invites={this.state.invites}
136− {online ? <KeysAndMetadata pointDetails={pointDetails} /> : <div />}
@@ -142,7 +106,6 @@ class PointHome extends React.Component {
143export default compose(
107export default compose(
144 withNetwork,
108 withNetwork,
146 withPointCursor,
109 withPointCursor,
147 withPointCache
110 withPointCache
148)(PointHome);
111)(PointHome);