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 44
55<h1 align =" center " ><b >State Debugger for React</b ></h1 >
66
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 )
88
99<p align =" center " >
1010<img src =" ./assets/hooks-demo.gif " />
Original file line number Diff line number Diff line change 133133 "recoil" : " 0.0.10" ,
134134 "sankey" : " ^2.0.2"
135135 }
136- }
136+ }
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ const StateRoute = (props: StateRouteProps) => {
135135 activeClassName = "is-active"
136136 to = "/relationship"
137137 >
138- Relationships
138+ Data Flow
139139 </ NavLink >
140140 ) }
141141
Original file line number Diff line number Diff line change @@ -89,10 +89,9 @@ function MainContainer(): any {
8989 if ( ! user . debug ) {
9090 //set current user cookie if it does not exist in cookies;
9191 if ( user . checkDocumentCookie ( document ) ) {
92- user . getCookie ( ) ;
9392 mixpanel . people . increment ( user . get_dId ( ) , "times" ) ;
9493 } else {
95- user . setCookie ( ) ;
94+ document . cookie = user . setCookie ( ) ;
9695 mixpanel . people . set ( user . get_dId ( ) , { times : 1 } ) ;
9796 }
9897 }
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ class MPID{
1212 //create a string of random data
1313 this . cookie = cookie . serialize ( "reactime" , crypto . randomBytes ( 64 ) . toString ( 'hex' ) ) ;
1414 this . distinct_id = this . cookie ?. reactime ?. slice ( 0 , 20 ) ;
15-
1615 if ( this . cookie ) {
1716 return this . cookie ;
1817 } else {
@@ -22,7 +21,8 @@ class MPID{
2221 }
2322
2423 getCookie ( ) {
25- if ( this . cookie ) {
24+ if ( this . cookie ) {
25+ //this.distinct_id = parsedCookie?.reactime?.slice(0, 20);
2626 return this . cookie ;
2727 } else {
2828 throw new Error ( "Cookie truthy, but unreturnable" ) ;
@@ -37,7 +37,8 @@ class MPID{
3737 this . cookie = parsedCookie ?. reactime ;
3838 if ( ! this . distinct_id ) {
3939 this . distinct_id = parsedCookie ?. reactime ?. slice ( 0 , 20 ) ;
40- }
40+ }
41+ return true ;
4142 } else {
4243 this . setCookie ( ) ;
4344 return false ;
@@ -48,6 +49,9 @@ class MPID{
4849 try {
4950 if ( this . distinct_id ) {
5051 return this . distinct_id ;
52+ } else {
53+
54+ //return this.checkDocumentCookie
5155 }
5256 } catch ( e ) {
5357 throw new Error ( `unable to set cookie. Reason: ${ e } . ` ) ;
You can’t perform that action at this time.
0 commit comments