on fe6ee13 help sign in
bridge/src/components/Greeting.js
66 lines 2.0 kB history raw
1import React, { useCallback } from 'react';
2import cn from 'classnames';
3import ob from 'urbit-ob';
4import { Grid, Text, LinkButton } from 'indigo-react';
6import { useLocalRouter } from 'lib/LocalRouter';
8import useWasGreeted from 'lib/useWasGreeted';
9import useCurrentPermissions from 'lib/useCurrentPermissions';
11const TEXT_STYLE = 'f5';
13export default function ActivateDisclaimer({ point }) {
14 const { push, names } = useLocalRouter();
16 const [wasGreeted, setWasGreeted] = useWasGreeted();
17 const { isActiveOwner } = useCurrentPermissions();
19 const pointName = ob.patp(point);
21 const dismiss = useCallback(async () => {
22 setWasGreeted(true);
23 }, [setWasGreeted]);
25 return (
26 !wasGreeted && (
27 <Grid gap={4} className="mb10">
28 <Grid.Item full>
29 <Text className={cn(TEXT_STYLE, 'block mb4')}>
30 Welcome <code>{pointName}</code>,
31 </Text>
33 <Text className={cn(TEXT_STYLE, 'block mb2')}>
34 As of this moment, you own a piece of Urbit. No one can take it from
35 you, and you can keep it for the rest of your life.
36 </Text>
37 <Text className={cn(TEXT_STYLE, 'block mb2')}>
38 Keep your Master Ticket safe. No one can recover it for you. But it
39 can get you back into Urbit at any time.
40 </Text>
41 <Text className={cn(TEXT_STYLE, 'block mb2')}>
42 Right now you can:
43 </Text>
44 </Grid.Item>
46 <Grid.Item
47 full
48 as={LinkButton}
49 href="https://urbit.org/docs/getting-started/">
50 <Text className={cn(TEXT_STYLE, 'block mb2')}>
51 Boot Arvo, the Urbit OS
52 </Text>
53 </Grid.Item>
55 <Grid.Item full>
56 <Text className={cn(TEXT_STYLE, 'block mb4')}>
57 Welcome to Urbit. See you online.
58 </Text>
59 </Grid.Item>
60 <Grid.Item full as={LinkButton} onClick={dismiss}>
61 Close
62 </Grid.Item>
63 </Grid>
64 )
65 );