File tree Expand file tree Collapse file tree 5 files changed +11
-8
lines changed Expand file tree Collapse file tree 5 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 4
4
5
5
<h1 align =" center " ><b >State Debugger for React</b ></h1 >
6
6
7
- [ ![ GitHub] ( https://img.shields.io/github/license/oslabs-beta/reactime )] ( https://github.com/oslabs-beta/reactime ) [ ![ Build Status] ( https://travis-ci.com/oslabs-beta/reactime.svg?branch=master )] ( https://travis-ci.com/oslabs-beta/reactime ) [ ![ npm version] ( https://badge.fury.io/js/reactime.svg )] ( http://badge.fury.io/js/reactime ) [ ![ Dependencies ] ( https://david-dm.org/oslabs-beta/reactime.svg )] ( https://david-dm.org/oslabs-beta/reactime#info=dependencies ) [ ![ DevDependencies ] ( https://david-dm.org/oslabs-beta/reactime/dev-status.svg )] ( https://david-dm.org/oslabs-beta/reactime?type=dev ) [ ![ Vulnerabilities] ( https://snyk.io/test/github/oslabs-beta/reactime/badge.svg )] ( https://snyk.io/test/github/oslabs-beta/reactime ) ![ BabelPresetPrefs] ( https://img.shields.io/badge/babel%20preset-airbnb-ff69b4 ) ![ LintPrefs] ( https://img.shields.io/badge/linted%20with-eslint-blueviolet )
7
+ [ ![ GitHub] ( https://img.shields.io/github/license/oslabs-beta/reactime )] ( https://github.com/oslabs-beta/reactime ) [ ![ Build Status] ( https://travis-ci.com/oslabs-beta/reactime.svg?branch=master )] ( https://travis-ci.com/oslabs-beta/reactime ) [ ![ npm version] ( https://badge.fury.io/js/reactime.svg )] ( http://badge.fury.io/js/reactime ) [ ![ Vulnerabilities] ( https://snyk.io/test/github/oslabs-beta/reactime/badge.svg )] ( https://snyk.io/test/github/oslabs-beta/reactime ) ![ BabelPresetPrefs] ( https://img.shields.io/badge/babel%20preset-airbnb-ff69b4 ) ![ LintPrefs] ( https://img.shields.io/badge/linted%20with-eslint-blueviolet )
8
8
9
9
<p align =" center " >
10
10
<img src =" ./assets/hooks-demo.gif " />
Original file line number Diff line number Diff line change 133
133
"recoil" : " 0.0.10" ,
134
134
"sankey" : " ^2.0.2"
135
135
}
136
- }
136
+ }
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ const StateRoute = (props: StateRouteProps) => {
135
135
activeClassName = "is-active"
136
136
to = "/relationship"
137
137
>
138
- Relationships
138
+ Data Flow
139
139
</ NavLink >
140
140
) }
141
141
Original file line number Diff line number Diff line change @@ -89,10 +89,9 @@ function MainContainer(): any {
89
89
if ( ! user . debug ) {
90
90
//set current user cookie if it does not exist in cookies;
91
91
if ( user . checkDocumentCookie ( document ) ) {
92
- user . getCookie ( ) ;
93
92
mixpanel . people . increment ( user . get_dId ( ) , "times" ) ;
94
93
} else {
95
- user . setCookie ( ) ;
94
+ document . cookie = user . setCookie ( ) ;
96
95
mixpanel . people . set ( user . get_dId ( ) , { times : 1 } ) ;
97
96
}
98
97
}
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ class MPID{
12
12
//create a string of random data
13
13
this . cookie = cookie . serialize ( "reactime" , crypto . randomBytes ( 64 ) . toString ( 'hex' ) ) ;
14
14
this . distinct_id = this . cookie ?. reactime ?. slice ( 0 , 20 ) ;
15
-
16
15
if ( this . cookie ) {
17
16
return this . cookie ;
18
17
} else {
@@ -22,7 +21,8 @@ class MPID{
22
21
}
23
22
24
23
getCookie ( ) {
25
- if ( this . cookie ) {
24
+ if ( this . cookie ) {
25
+ //this.distinct_id = parsedCookie?.reactime?.slice(0, 20);
26
26
return this . cookie ;
27
27
} else {
28
28
throw new Error ( "Cookie truthy, but unreturnable" ) ;
@@ -37,7 +37,8 @@ class MPID{
37
37
this . cookie = parsedCookie ?. reactime ;
38
38
if ( ! this . distinct_id ) {
39
39
this . distinct_id = parsedCookie ?. reactime ?. slice ( 0 , 20 ) ;
40
- }
40
+ }
41
+ return true ;
41
42
} else {
42
43
this . setCookie ( ) ;
43
44
return false ;
@@ -48,6 +49,9 @@ class MPID{
48
49
try {
49
50
if ( this . distinct_id ) {
50
51
return this . distinct_id ;
52
+ } else {
53
+
54
+ //return this.checkDocumentCookie
51
55
}
52
56
} catch ( e ) {
53
57
throw new Error ( `unable to set cookie. Reason: ${ e } . ` ) ;
You can’t perform that action at this time.
0 commit comments