1import Maybe from 'folktale/maybe'
2import React from 'react'
3import * as ob from 'urbit-ob'
5import { Button } from '../components/Base'
6import { Row, Col, H1, P } from '../components/Base'
7import { InnerLabel, PointInput, ValidatedSigil } from '../components/Base'
9import { ROUTE_NAMES } from '../lib/router'
11class ViewPoint extends React.Component {
19 this.handlePointInput = this.handlePointInput.bind(this)
22 handlePointInput = (pointName) => {
23 if (pointName.length < 15) {
24 this.setState({ pointName })
29 const { pointName } = this.state
30 const { popRoute, pushRoute, setPointCursor } = this.props
34 // could use a better patp parser in urbit-ob
37 valid = ob.isValidPatp(pointName)
45 <H1>{ 'View a Point' }</H1>
48 { "Enter a point name to view its public information." }
54 prop-format='innerLabel'
56 placeholder='e.g. ~zod'
57 onChange={ this.handlePointInput }
59 <InnerLabel>{'Point Name'}</InnerLabel>
61 className={'tr-0 mt-05 mr-0 abs'}
70 disabled={ valid === false }
73 setPointCursor(Maybe.Just(ob.patp2dec(pointName)))
75 pushRoute(ROUTE_NAMES.SHIP)
88export default ViewPoint
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list