Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add authcore login #452

Merged
merged 5 commits into from
Mar 15, 2024
Merged

✨ Add authcore login #452

merged 5 commits into from
Mar 15, 2024

Conversation

williamchong
Copy link
Member

@williamchong williamchong commented Mar 7, 2024

Also changes some likerland app and keplr hardcode condition/text

Comment on lines +63 to +65
if (window.sessionStorage) {
window.sessionStorage.removeItem('USER_POST_AUTH_ROUTE');
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are some duplicated actions, maybe we could reorganize them like this:

manageSessionStorage(key: string, value?: string): void {
  if (window.sessionStorage) {
    if (value !== undefined) {
      window.sessionStorage.setItem(key, value);
    } else {
      window.sessionStorage.removeItem(key);
    }
  }
}

const USER_POST_AUTH_ROUTE = 'USER_POST_AUTH_ROUTE'

manageSessionStorage(USER_POST_AUTH_ROUTE, storedRoute); 
manageSessionStorage(USER_POST_AUTH_ROUTE);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe when we reach rule of three

@williamchong williamchong merged commit 8afd6b2 into likecoin:main Mar 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants