fix: get hash without “#”
This commit is contained in:
parent
611d7d192f
commit
42677df32e
2 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,7 @@ const AccountHandoff = () => {
|
|||
const retrieveAccountData = () => {
|
||||
try {
|
||||
// get the data from the fragment
|
||||
const fragment = window.location.hash;
|
||||
const fragment = window.location.hash.substring(1);
|
||||
|
||||
const stringified = window.atob(fragment);
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import { AppContext } from 'pages/_app';
|
|||
// import mlIDbStorage from 'utils/storage/mlIDbStorage';
|
||||
import { APPS, CLIENT_PACKAGE_NAMES } from '@ente/shared/apps/constants';
|
||||
import ThemeSwitcher from '@ente/shared/components/ThemeSwitcher';
|
||||
import { getData, LS_KEYS } from '@ente/shared/storage/localStorage';
|
||||
import { LS_KEYS, getData } from '@ente/shared/storage/localStorage';
|
||||
import { THEME_COLOR } from '@ente/shared/themes/constants';
|
||||
import { EnteMenuItem } from 'components/Menu/EnteMenuItem';
|
||||
import WatchFolder from 'components/WatchFolder';
|
||||
|
@ -72,10 +72,10 @@ export default function UtilitySection({ closeSidebar }) {
|
|||
// serialize the user data to pass it over to accounts
|
||||
const userData = getData(LS_KEYS.USER);
|
||||
const serialized = JSON.stringify(userData);
|
||||
const serializeB64 = window.btoa(serialized);
|
||||
const serializedB64 = window.btoa(serialized);
|
||||
|
||||
window.location.href = `${process.env.NEXT_PUBLIC_ACCOUNTS_ENDPOINT}${ACCOUNTS_PAGES.ACCOUNT_HANDOFF
|
||||
}?package=${CLIENT_PACKAGE_NAMES.get(APPS.PHOTOS)}#${serializeB64}`;
|
||||
}?package=${CLIENT_PACKAGE_NAMES.get(APPS.PHOTOS)}#${serializedB64}`;
|
||||
};
|
||||
|
||||
const redirectToDeduplicatePage = () => router.push(PAGES.DEDUPLICATE);
|
||||
|
|
Loading…
Add table
Reference in a new issue