Skip to content

Commit f148347

Browse files
authored
Merge pull request #212 from open-source-labs/staging
Merge Staging into Master
2 parents 30f5e9f + b3e689f commit f148347

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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" />

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,4 @@
133133
"recoil": "0.0.10",
134134
"sankey": "^2.0.2"
135135
}
136-
}
136+
}

src/app/components/StateRoute.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

src/app/containers/MainContainer.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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
}

src/app/user_id/user_id.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff 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}. `);

0 commit comments

Comments
 (0)