mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-26 00:11:13 +02:00
consolidate loggedin events
This commit is contained in:
@@ -19,7 +19,13 @@ export const authh = {
|
|||||||
},
|
},
|
||||||
async login(providerName) {
|
async login(providerName) {
|
||||||
const onSuccess = () => {
|
const onSuccess = () => {
|
||||||
trackEvent('fn', 'loggedIn', providerName);
|
trackEvent(
|
||||||
|
'fn',
|
||||||
|
'loggedIn',
|
||||||
|
providerName,
|
||||||
|
window.IS_EXTENSION ? 'extension' : 'web'
|
||||||
|
);
|
||||||
|
|
||||||
// Save to recommend next time
|
// Save to recommend next time
|
||||||
window.db.local.set({
|
window.db.local.set({
|
||||||
lastAuthProvider: providerName
|
lastAuthProvider: providerName
|
||||||
|
@@ -220,7 +220,6 @@ export default class App extends Component {
|
|||||||
this.setState({ user: newUser });
|
this.setState({ user: newUser });
|
||||||
window.user = newUser;
|
window.user = newUser;
|
||||||
// window.localStorage.setItem('user', authUser);
|
// window.localStorage.setItem('user', authUser);
|
||||||
trackEvent('fn', 'loggedIn', window.IS_EXTENSION ? 'extension' : 'web');
|
|
||||||
|
|
||||||
if (!window.localStorage[LocalStorageKeys.ASKED_TO_IMPORT_CREATIONS]) {
|
if (!window.localStorage[LocalStorageKeys.ASKED_TO_IMPORT_CREATIONS]) {
|
||||||
this.fetchItems(false, true).then(items => {
|
this.fetchItems(false, true).then(items => {
|
||||||
|
Reference in New Issue
Block a user