import Maybe from 'folktale/maybe'; import React from 'react'; import * as ob from 'urbit-ob'; import { Button } from '../components/old/Base'; import { Row, Col, H1, P } from '../components/old/Base'; import { InnerLabel, PointInput, ValidatedSigil } from '../components/old/Base'; import { ROUTE_NAMES } from '../lib/routeNames'; import { withHistory } from '../store/history'; import { compose } from '../lib/lib'; import { withPointCursor } from '../store/pointCursor'; class ViewPoint extends React.Component { constructor(props) { super(props); this.state = { pointName: '', }; this.handlePointInput = this.handlePointInput.bind(this); } handlePointInput = pointName => { if (pointName.length < 15) { this.setState({ pointName }); } }; render() { const { pointName } = this.state; const { history, setPointCursor } = this.props; // NB (jtobin): // // could use a better patp parser in urbit-ob let valid; try { valid = ob.isValidPatp(pointName); } catch (err) { valid = false; } return (

{'View a Point'}

{'Enter a point name to view its public information.'}

{'Point Name'}
); } } export default compose( withHistory, withPointCursor )(ViewPoint);