diff --git a/frontend/app/components/Signup/SignupForm/SignupForm.js b/frontend/app/components/Signup/SignupForm/SignupForm.js index 37050eec0..90580973d 100644 --- a/frontend/app/components/Signup/SignupForm/SignupForm.js +++ b/frontend/app/components/Signup/SignupForm/SignupForm.js @@ -6,6 +6,7 @@ import stl from './signup.module.css' import { signup } from 'Duck/user'; import { connect } from 'react-redux' import Select from 'Shared/Select' +import { SITE_ID_STORAGE_KEY } from 'App/constants/storageKeys'; const LOGIN_ROUTE = login() const recaptchaRef = React.createRef() @@ -40,10 +41,10 @@ export default class SignupForm extends React.Component { } return null; } - handleSubmit = (token) => { const { tenantId, fullname, password, email, projectName, organizationName, auth } = this.state; + localStorage.removeItem(SITE_ID_STORAGE_KEY) this.props.signup({ tenantId, fullname, password, email, projectName, organizationName, auth, 'g-recaptcha-response': token }) this.setState({ reload: true }) } diff --git a/frontend/app/constants/storageKeys.ts b/frontend/app/constants/storageKeys.ts index 58a5ae70c..e06625fb6 100644 --- a/frontend/app/constants/storageKeys.ts +++ b/frontend/app/constants/storageKeys.ts @@ -3,4 +3,5 @@ export const TIMEZONE = "__$session-timezone$__" export const DURATION_FILTER = "__$session-durationFilter$__" export const SESSION_FILTER = "__$session-filter$__" export const GLOBAL_DESTINATION_PATH = "__$global-destinationPath$__" -export const GLOBAL_HAS_NO_RECORDINGS = "__$global-hasNoRecordings$__" \ No newline at end of file +export const GLOBAL_HAS_NO_RECORDINGS = "__$global-hasNoRecordings$__" +export const SITE_ID_STORAGE_KEY = "__$user-siteId$__" \ No newline at end of file diff --git a/frontend/app/duck/site.js b/frontend/app/duck/site.js index e1a4b9ea6..54d1e1688 100644 --- a/frontend/app/duck/site.js +++ b/frontend/app/duck/site.js @@ -15,14 +15,12 @@ import { createEdit, createRemove, createUpdate, - createSave, saveType, } from './funcTools/crud'; import { createRequestReducer } from './funcTools/request'; import { Map, List, fromJS } from "immutable"; -import { GLOBAL_HAS_NO_RECORDINGS } from 'App/constants/storageKeys'; +import { GLOBAL_HAS_NO_RECORDINGS, SITE_ID_STORAGE_KEY } from 'App/constants/storageKeys'; -const SITE_ID_STORAGE_KEY = "__$user-siteId$__"; const storedSiteId = localStorage.getItem(SITE_ID_STORAGE_KEY); const name = 'project';