on ebdc206 help sign in
bridge/src/components/Greeting.js
60 lines 1.7 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 useWasGreeted from 'lib/useWasGreeted';
8const TEXT_STYLE = 'f5';
10export default function ActivateDisclaimer({ point }) {
11 const [wasGreeted, setWasGreeted] = useWasGreeted();
13 const pointName = ob.patp(point);
15 const dismiss = useCallback(async () => {
16 setWasGreeted(true);
17 }, [setWasGreeted]);
19 if (wasGreeted) {
20 return null;
21 }
23 return (
24 <Grid gap={4} className="mb10">
25 <Grid.Item full>
26 <Text className={cn(TEXT_STYLE, 'block mb4')}>
27 Welcome <span className="mono">{pointName}</span>,
28 </Text>
30 <Text className={cn(TEXT_STYLE, 'block mb2')}>
31 As of this moment, you own a piece of Urbit. No one can take it from
32 you, and you can keep it for the rest of your life.
33 </Text>
34 <Text className={cn(TEXT_STYLE, 'block mb2')}>
35 Keep your Master Ticket safe. No one can recover it for you. But it
36 can get you back into Urbit at any time.
37 </Text>
38 <Text className={cn(TEXT_STYLE, 'block mb2')}>Right now you can:</Text>
39 </Grid.Item>
41 <Grid.Item
42 full
43 as={LinkButton}
44 href="https://urbit.org/docs/getting-started/">
45 <Text className={cn(TEXT_STYLE, 'block mb2')}>
46 Boot Arvo, the Urbit OS
47 </Text>
48 </Grid.Item>
50 <Grid.Item full>
51 <Text className={cn(TEXT_STYLE, 'block mb4')}>
52 Welcome to Urbit. See you online.
53 </Text>
54 </Grid.Item>
55 <Grid.Item full as={LinkButton} onClick={dismiss}>
56 Close
57 </Grid.Item>
58 </Grid>
59 );