Skip to content

Commit

Permalink
Merge pull request #437 from HarperDB/stage
Browse files Browse the repository at this point in the history
Added `Reo.identify()` to SignIn Button for Campaigns
  • Loading branch information
BboyAkers authored Nov 27, 2024
2 parents a9251cf + 7a57726 commit 453f6f3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "harperdb-studio",
"version": "4.8.8",
"version": "4.8.9",
"description": "A UI for HarperDB",
"deploymentUrl": "studio.harperdb.io",
"private": true,
Expand Down
8 changes: 8 additions & 0 deletions src/components/auth/SignIn.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function SignIn() {
const [formData, setFormData] = useState({});
const [persistedUser, setPersistedUser] = usePersistedUser({});


const submit = async () => {
setFormState({ submitted: true });
const { email, pass } = formData;
Expand All @@ -38,6 +39,13 @@ function SignIn() {
setTimeout(() => setFormState({}), 5000);
} else {
setPersistedUser({ ...persistedUser, email, pass });
const identity = {
username: email,
type: "email",
company: email.split('@')[1] // domain name
};
/* global Reo */
Reo.identify(identity)
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const reoPromise = (is_local_studio) => is_local_studio ? Promise.resolve() : lo
const initReoDotDev = async () => {
try {
const Reo = await reoPromise(config.is_local_studio);
await Reo.init({ clientID });
Reo.init({ clientID });
}
catch (error) {
console.error('Error loading Reo', error);

Check warning on line 17 in src/index.js

View workflow job for this annotation

GitHub Actions / publishProductionStudio

Unexpected console statement
Expand Down

0 comments on commit 453f6f3

Please sign in to comment.