-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathstream.tsx
92 lines (85 loc) · 2.66 KB
/
stream.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import React from 'react';
import {DefaultSeo} from 'next-seo';
import ViewFlowSelection from 'components/apps/stream/0.ViewFlowSelection';
import ViewVestingConfiguration from 'components/apps/stream/1.ViewStreamConfiguration';
import ViewVestingSummary from 'components/apps/stream/2.ViewStreamSummary';
import ViewUserVestings from 'components/apps/stream/3.ViewUserStreams';
import {Step, StreamContextApp, useStream} from '@stream/useStream';
import {cl} from '@yearn-finance/web-lib/utils/cl';
import type {ReactElement} from 'react';
function Stream(): ReactElement {
const {currentStep, currentFlow} = useStream();
return (
<div className={'mx-auto grid w-full max-w-4xl'}>
<div className={'mb-10 mt-6 flex flex-col justify-center md:mt-20'}>
<h1 className={'-ml-1 mt-4 w-full text-3xl tracking-tight text-neutral-900 md:mt-6 md:text-5xl'}>
{'SmolStream'}
</h1>
<b
className={cl(
'mt-4 w-full whitespace-break-spaces text-base leading-normal text-neutral-500',
'md:w-2/3 md:text-lg md:leading-8'
)}>
{'Whether it’s salaries, a token vest, or something else… \n'}
{'Stream it simply, safely and sexily with SmolStream.'}
</b>
</div>
<div id={'flow'}>
<ViewFlowSelection />
</div>
<div
id={'configuration'}
className={`pt-10 transition-opacity ${
[Step.SUMMARY, Step.CONFIGURATION].includes(currentStep)
? 'opacity-100'
: 'pointer-events-none h-0 overflow-hidden opacity-0'
}`}>
{currentFlow === 'CHECK' ? <ViewUserVestings /> : <ViewVestingConfiguration />}
</div>
<div
id={'summary'}
className={`overflow-x-hidden pt-10 transition-opacity ${
[Step.SUMMARY].includes(currentStep)
? 'opacity-100'
: 'pointer-events-none h-0 overflow-hidden opacity-0'
}`}>
<ViewVestingSummary />
</div>
</div>
);
}
export default function VestingWrapper(): ReactElement {
return (
<StreamContextApp>
<>
<DefaultSeo
title={'SmolStream - SmolDapp'}
defaultTitle={'SmolStream - SmolDapp'}
description={'Stream it simply, safely and sexily with SmolStream.'}
openGraph={{
type: 'website',
locale: 'en-US',
url: 'https://smold.app/stream',
site_name: 'SmolStream - SmolDapp',
title: 'SmolStream - SmolDapp',
description: 'Stream it simply, safely and sexily with SmolStream.',
images: [
{
url: 'https://smold.app/og_stream.png',
width: 800,
height: 400,
alt: 'Stream'
}
]
}}
twitter={{
handle: '@smoldapp',
site: '@smoldapp',
cardType: 'summary_large_image'
}}
/>
<Stream />
</>
</StreamContextApp>
);
}