|
|
@@ -3,80 +3,86 @@ import { getSession, signin, signout, useSession } from 'next-auth/client'
|
|
3
|
3
|
import { GetServerSideProps } from 'next'
|
|
4
|
4
|
import Link from 'next/link'
|
|
5
|
5
|
import React from 'react'
|
|
|
6
|
+import Head from 'next/head'
|
|
6
|
7
|
|
|
7
|
8
|
export default function Sponsorware(): JSX.Element {
|
|
8
|
9
|
const [session, loading] = useSession()
|
|
9
|
10
|
|
|
10
|
11
|
return (
|
|
11
|
|
- <OuterContent>
|
|
12
|
|
- <Content
|
|
13
|
|
- size={{
|
|
14
|
|
- '@sm': 'small',
|
|
15
|
|
- }}
|
|
16
|
|
- >
|
|
17
|
|
- <h1>tldraw (is sponsorware)</h1>
|
|
18
|
|
- <p>
|
|
19
|
|
- Hey, thanks for visiting <Link href="/">tldraw</Link>, a tiny little drawing app by{' '}
|
|
20
|
|
- <a
|
|
21
|
|
- target="_blank"
|
|
22
|
|
- rel="noreferrer nofollow noopener"
|
|
23
|
|
- href="https://twitter.com/steveruizok"
|
|
24
|
|
- >
|
|
25
|
|
- steveruizok
|
|
26
|
|
- </a>{' '}
|
|
27
|
|
- and friends .
|
|
28
|
|
- </p>
|
|
29
|
|
- <video autoPlay muted playsInline onClick={(e) => e.currentTarget.play()}>
|
|
30
|
|
- <source src="images/hello.mp4" type="video/mp4" />
|
|
31
|
|
- </video>
|
|
32
|
|
- <p>This project is currently: </p>
|
|
33
|
|
- <ul>
|
|
34
|
|
- <li>in development</li>
|
|
35
|
|
- <li>only available for my sponsors</li>
|
|
36
|
|
- </ul>
|
|
37
|
|
- <p>
|
|
38
|
|
- If you'd like to try it out,{' '}
|
|
39
|
|
- <a
|
|
40
|
|
- href="https://github.com/sponsors/steveruizok"
|
|
41
|
|
- target="_blank"
|
|
42
|
|
- rel="noopener noreferrer"
|
|
43
|
|
- >
|
|
44
|
|
- sponsor me on Github
|
|
45
|
|
- </a>{' '}
|
|
46
|
|
- (at any level) and sign in below.
|
|
47
|
|
- </p>
|
|
48
|
|
- <ButtonGroup>
|
|
49
|
|
- {session ? (
|
|
50
|
|
- <>
|
|
51
|
|
- <Button onClick={() => signout()} variant={'secondary'}>
|
|
52
|
|
- Sign Out
|
|
53
|
|
- </Button>
|
|
54
|
|
- <Detail>
|
|
55
|
|
- Signed in as {session?.user?.name} ({session?.user?.email}), but it looks like
|
|
56
|
|
- you're not yet a sponsor.
|
|
57
|
|
- <br />
|
|
58
|
|
- Something wrong? Try <Link href="/">reloading the page</Link> or DM me on{' '}
|
|
59
|
|
- <a
|
|
60
|
|
- target="_blank"
|
|
61
|
|
- rel="noreferrer nofollow noopener"
|
|
62
|
|
- href="https://twitter.com/steveruizok"
|
|
63
|
|
- >
|
|
64
|
|
- Twitter
|
|
65
|
|
- </a>
|
|
66
|
|
- .
|
|
67
|
|
- </Detail>
|
|
68
|
|
- </>
|
|
69
|
|
- ) : (
|
|
70
|
|
- <>
|
|
71
|
|
- <Button onClick={() => signin('github')} variant={'primary'}>
|
|
72
|
|
- {loading ? 'Loading...' : 'Sign in With Github'}
|
|
73
|
|
- </Button>
|
|
74
|
|
- <Detail>Already a sponsor? Just sign in to visit the app.</Detail>
|
|
75
|
|
- </>
|
|
76
|
|
- )}
|
|
77
|
|
- </ButtonGroup>
|
|
78
|
|
- </Content>
|
|
79
|
|
- </OuterContent>
|
|
|
12
|
+ <>
|
|
|
13
|
+ <Head>
|
|
|
14
|
+ <title>tldraw</title>
|
|
|
15
|
+ </Head>
|
|
|
16
|
+ <OuterContent>
|
|
|
17
|
+ <Content
|
|
|
18
|
+ size={{
|
|
|
19
|
+ '@sm': 'small',
|
|
|
20
|
+ }}
|
|
|
21
|
+ >
|
|
|
22
|
+ <h1>tldraw (is sponsorware)</h1>
|
|
|
23
|
+ <p>
|
|
|
24
|
+ Hey, thanks for visiting <Link href="/">tldraw</Link>, a tiny little drawing app by{' '}
|
|
|
25
|
+ <a
|
|
|
26
|
+ target="_blank"
|
|
|
27
|
+ rel="noreferrer nofollow noopener"
|
|
|
28
|
+ href="https://twitter.com/steveruizok"
|
|
|
29
|
+ >
|
|
|
30
|
+ steveruizok
|
|
|
31
|
+ </a>{' '}
|
|
|
32
|
+ and friends .
|
|
|
33
|
+ </p>
|
|
|
34
|
+ <video autoPlay muted playsInline onClick={(e) => e.currentTarget.play()}>
|
|
|
35
|
+ <source src="images/hello.mp4" type="video/mp4" />
|
|
|
36
|
+ </video>
|
|
|
37
|
+ <p>This project is currently: </p>
|
|
|
38
|
+ <ul>
|
|
|
39
|
+ <li>in development</li>
|
|
|
40
|
+ <li>only available for my sponsors</li>
|
|
|
41
|
+ </ul>
|
|
|
42
|
+ <p>
|
|
|
43
|
+ If you'd like to try it out,{' '}
|
|
|
44
|
+ <a
|
|
|
45
|
+ href="https://github.com/sponsors/steveruizok"
|
|
|
46
|
+ target="_blank"
|
|
|
47
|
+ rel="noopener noreferrer"
|
|
|
48
|
+ >
|
|
|
49
|
+ sponsor me on Github
|
|
|
50
|
+ </a>{' '}
|
|
|
51
|
+ (at any level) and sign in below.
|
|
|
52
|
+ </p>
|
|
|
53
|
+ <ButtonGroup>
|
|
|
54
|
+ {session ? (
|
|
|
55
|
+ <>
|
|
|
56
|
+ <Button onClick={() => signout()} variant={'secondary'}>
|
|
|
57
|
+ Sign Out
|
|
|
58
|
+ </Button>
|
|
|
59
|
+ <Detail>
|
|
|
60
|
+ Signed in as {session?.user?.name} ({session?.user?.email}), but it looks like
|
|
|
61
|
+ you're not yet a sponsor.
|
|
|
62
|
+ <br />
|
|
|
63
|
+ Something wrong? Try <Link href="/">reloading the page</Link> or DM me on{' '}
|
|
|
64
|
+ <a
|
|
|
65
|
+ target="_blank"
|
|
|
66
|
+ rel="noreferrer nofollow noopener"
|
|
|
67
|
+ href="https://twitter.com/steveruizok"
|
|
|
68
|
+ >
|
|
|
69
|
+ Twitter
|
|
|
70
|
+ </a>
|
|
|
71
|
+ .
|
|
|
72
|
+ </Detail>
|
|
|
73
|
+ </>
|
|
|
74
|
+ ) : (
|
|
|
75
|
+ <>
|
|
|
76
|
+ <Button onClick={() => signin('github')} variant={'primary'}>
|
|
|
77
|
+ {loading ? 'Loading...' : 'Sign in With Github'}
|
|
|
78
|
+ </Button>
|
|
|
79
|
+ <Detail>Already a sponsor? Just sign in to visit the app.</Detail>
|
|
|
80
|
+ </>
|
|
|
81
|
+ )}
|
|
|
82
|
+ </ButtonGroup>
|
|
|
83
|
+ </Content>
|
|
|
84
|
+ </OuterContent>
|
|
|
85
|
+ </>
|
|
80
|
86
|
)
|
|
81
|
87
|
}
|
|
82
|
88
|
|