File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import firebase from "firebase/app";
3
3
import "firebase/storage" ;
4
4
import "firebase/database" ;
5
5
import "firebase/firestore" ;
6
+ import "firebase/analytics" ;
6
7
7
8
import FirebaseContext from "../../context/FirebaseContext" ;
8
9
@@ -30,6 +31,7 @@ const FirebaseProvider: FC<Props> = ({ children }: Props) => {
30
31
} catch {
31
32
setApp ( firebase . initializeApp ( CONFIG ) ) ;
32
33
}
34
+ firebase . analytics ( ) ;
33
35
} , [ ] ) ;
34
36
35
37
if ( app === null ) return < div > Loading...</ div > ;
Original file line number Diff line number Diff line change @@ -111,11 +111,12 @@ const Home: FC<{}> = () => {
111
111
disabled = {
112
112
isLoading || ! finished || totalArticles === 0 || totalCitations === 0
113
113
}
114
- onClick = { ( ) =>
114
+ onClick = { ( ) => {
115
115
firebase &&
116
- finished &&
117
- create ( { app : firebase , files : files . map ( ( file ) => file . hash ) } )
118
- }
116
+ finished &&
117
+ create ( { app : firebase , files : files . map ( ( file ) => file . hash ) } ) ;
118
+ firebase && firebase . analytics ( ) . logEvent ( "tree_created" ) ;
119
+ } }
119
120
>
120
121
{ isLoading ? "LOADING..." : finished ? "CONTINUE" : "UPLOADING..." }
121
122
</ button >
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const MoveFirstIcon = () => (
10
10
< path
11
11
d = "M16 10L8 2M10 10l-8 8M16 18l-8-8M10 2l-8 8"
12
12
stroke = "#FCFCFC"
13
- stroke-width = "3"
13
+ strokeWidth = "3"
14
14
/>
15
15
</ svg >
16
16
) ;
You can’t perform that action at this time.
0 commit comments