@@ -1,20 +1,12 @@
11import { Just, Nothing } from 'folktale/maybe';
22import React from 'react';
3−import { pour } from 'sigil-js';
4−import * as ob from 'urbit-ob';
53import * as azimuth from 'azimuth-js';
64import * as need from '../lib/need';
75
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';
137
148import { compose } from '../lib/lib';
15−import { ROUTE_NAMES } from '../lib/routeNames';
169
17−import { withHistory } from '../store/history';
1810import { withNetwork } from '../store/network';
1911import { withPointCursor } from '../store/pointCursor';
2012import { withPointCache } from '../store/pointCache';
@@ -70,7 +62,7 @@ class PointHome extends React.Component {
7062 );
7163 }
7264
73− async updateBirthday(blockNumber) {
65+ async updateBirthday() {
7466 const birthBlock = await azimuth.azimuth.getActivationBlock(
7567 need.contracts(this.props),
7668 need.pointCursor(this.props)
@@ -79,6 +71,7 @@ class PointHome extends React.Component {
7971 this.setState({ birthday: Nothing() });
8072 } else {
8173 const block = await need.web3(this.props).eth.getBlock(birthBlock);
74+ //TODO add to point cache
8275 this.setState({ birthday: Just(new Date(block.timestamp * 1000)) });
8376 }
8477 }
@@ -97,43 +90,14 @@ class PointHome extends React.Component {
9790 };
9891
9992 render() {
100− const { web3, history, wallet, setPointCursor, pointCache } = this.props;
101−
102− const point = need.pointCursor(this.props);
103−
104− const pointDetails =
105− point in pointCache ? Just(pointCache[point]) : Nothing();
106−
107− const name = ob.patp(point);
108−
109− const sigil = pour({
110− patp: name,
111− renderer: ReactSVGComponents,
112− size: 256,
113− });
114−
115− const online = Just.hasInstance(web3);
116−
117− const authenticated = Just.hasInstance(wallet);
118−
11993 return (
12094 <Row>
12195 <Col>
122− <div className={'mt-12 pt-6'}>{sigil}</div>
123− <H1>
124− <code>{name}</code>
125− </H1>
126− {authenticated ? (
127− <Actions
128− online={online}
129− wallet={wallet}
130− point={point}
131− pointDetails={pointDetails}
132− invites={this.state.invites}
133− />
134− ) : null}
135−
136− {online ? <KeysAndMetadata pointDetails={pointDetails} /> : <div />}
96+ <P>Admin</P>
97+
98+ <P>Boot Arvo</P>
99+
100+ <P>Invite</P>
137101 </Col>
138102 </Row>
139103 );
@@ -142,7 +106,6 @@ class PointHome extends React.Component {
142106
143107export default compose(
144108 withNetwork,
145− withHistory,
146109 withPointCursor,
147110 withPointCache
148111)(PointHome);