on df0c310 help sign in
bridge/src/components/Greeting.jsx
57 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 full as={LinkButton} href="https://urbit.org/getting-started">
42 <Text className={cn(TEXT_STYLE, 'block mb2')}>
43 Boot Arvo, the Urbit OS
44 </Text>
45 </Grid.Item>
47 <Grid.Item full>
48 <Text className={cn(TEXT_STYLE, 'block mb4')}>
49 Welcome to Urbit. See you online.
50 </Text>
51 </Grid.Item>
52 <Grid.Item full as={LinkButton} onClick={dismiss}>
53 Close
54 </Grid.Item>
55 </Grid>
56 );