@@ -3,71 +3,110 @@ import {
33 AlignItems ,
44 ComponentSize ,
55 FlexBox ,
6- Icon ,
7- IconFont ,
86 ResourceCard ,
97} from '@influxdata/clockface'
108
9+ import confetti from 'canvas-confetti'
10+
1111import {
12- InfluxDBUniversityIcon ,
13- VSCodePluginIcon ,
12+ BookIcon ,
13+ CodeTerminalIcon ,
1414} from 'src/homepageExperience/components/HomepageIcons'
1515import { SafeBlankLink } from 'src/utils/SafeBlankLink'
1616
1717import { event } from 'src/cloud/utils/reporting'
18+ import FeedbackBar from 'src/homepageExperience/components/FeedbackBar'
1819
1920type OwnProps = {
2021 wizardEventName : string
22+ markStepAsCompleted : ( ) => void
23+ finishStepCompleted : boolean
24+ }
25+
26+ const fireConfetti = ( ) => {
27+ const count = 200
28+ const defaults = {
29+ origin : { y : 0.7 } ,
30+ }
31+
32+ const fire = ( particleRatio , options ) => {
33+ confetti ( {
34+ ...defaults ,
35+ ...options ,
36+ particleCount : Math . floor ( count * particleRatio ) ,
37+ } )
38+ }
39+
40+ fire ( 0.25 , {
41+ spread : 26 ,
42+ startVelocity : 55 ,
43+ } )
44+ fire ( 0.2 , {
45+ spread : 60 ,
46+ } )
47+ fire ( 0.35 , {
48+ spread : 100 ,
49+ decay : 0.91 ,
50+ scalar : 0.8 ,
51+ } )
52+ fire ( 0.1 , {
53+ spread : 120 ,
54+ startVelocity : 25 ,
55+ decay : 0.92 ,
56+ scalar : 1.2 ,
57+ } )
58+ fire ( 0.1 , {
59+ spread : 120 ,
60+ startVelocity : 45 ,
61+ } )
2162}
2263
2364export const Finish = ( props : OwnProps ) => {
2465 useEffect ( ( ) => {
25- event ( `firstMile.${ props . wizardEventName } .finished` )
66+ // if the finish step was opened during the session,
67+ // this check prevents from multiple logging of finish events
68+ // in case user navigates back and forth
69+ if ( ! props . finishStepCompleted ) {
70+ event ( `firstMile.${ props . wizardEventName } .finished` )
71+ props . markStepAsCompleted ( )
72+ fireConfetti ( )
73+ }
2674 } , [ ] )
75+
2776 return (
2877 < >
2978 < h1 > Congrats!</ h1 >
3079 < p > You completed setting up, writing, and querying data.</ p >
31- < p > Curious to learn more? Try these next steps!</ p >
80+ < FeedbackBar wizardEventName = { props . wizardEventName } />
81+ < p style = { { marginTop : '80px' } } >
82+ Curious to learn more? Try these next steps!
83+ </ p >
3284 < FlexBox margin = { ComponentSize . Medium } alignItems = { AlignItems . Stretch } >
3385 < ResourceCard className = "homepage-wizard-next-steps" >
34- < SafeBlankLink href = "https://influxdbu .com/" >
35- < h4 > { InfluxDBUniversityIcon } InfluxDB University </ h4 >
86+ < SafeBlankLink href = "https://github .com/InfluxCommunity/sample-flask/blob/main/app.py " >
87+ < h4 > { CodeTerminalIcon } Sample App </ h4 >
3688 </ SafeBlankLink >
3789 < p >
38- Our free hands-on courses teach you the technical skills and best
39- practices to get the most out of your real-time data with InfluxDB."
90+ Play around with our template code of sample app to streamline your
91+ own data into InfluxData.
4092 </ p >
4193 </ ResourceCard >
4294 < ResourceCard className = "homepage-wizard-next-steps" >
43- < SafeBlankLink href = "https://docs.influxdata.com/influxdb/cloud/tools/flux-vscode " >
44- < h4 > { VSCodePluginIcon } Install VSCode Plugin </ h4 >
95+ < SafeBlankLink href = "https://docs.influxdata.com" >
96+ < h4 > { BookIcon } Key Concepts </ h4 >
4597 </ SafeBlankLink >
46- < p > Streamline your workflow even further with our VSCode plugin! </ p >
98+ < p > Learn about important concepts for writing time-series data. </ p >
4799 </ ResourceCard >
48100 < ResourceCard className = "homepage-wizard-next-steps" >
49- < div
50- style = { {
51- display : 'flex' ,
52- justifyContent : 'center' ,
53- height : '100%' ,
54- textTransform : 'uppercase' ,
55- } }
56- >
57- < h5 >
58- More Options{ ' ' }
59- < Icon
60- glyph = { IconFont . ArrowRight_New }
61- style = { { marginLeft : '9px' } }
62- />
63- </ h5 >
64- </ div >
101+ < SafeBlankLink href = "https://influxdbu.com/" >
102+ < h4 > { CodeTerminalIcon } InfluxDB University</ h4 >
103+ </ SafeBlankLink >
104+ < p >
105+ Our free hands-on courses teach you the technical skills and best
106+ practices to get the most out of your real-time data with InfluxDB.
107+ </ p >
65108 </ ResourceCard >
66109 </ FlexBox >
67-
68- < p style = { { marginTop : '150px' } } >
69- What did you think about the set up process? Give us feedback to improve
70- </ p >
71110 </ >
72111 )
73112}
0 commit comments