mirror of
https://github.com/ente-io/ente.git
synced 2025-08-13 17:57:31 +00:00
npm doesn't support the "@" character in package names (it's used for scopes). We eventually want to move from yarn to npm, so in preparation, rename our internal packages accordingly so that they also work with npm workspaces. Methodology: No manual code changes, just automatic search replace of ``` "@/accounts => "ente-accounts "@/utils => "ente-utils ... "@ente/shared => "ente-shared ``` Then reran prettier.
15 lines
403 B
TypeScript
15 lines
403 B
TypeScript
import { nullToUndefined } from "ente-utils/transform";
|
|
|
|
/**
|
|
* Clear local storage on logout.
|
|
*
|
|
* This function clears everything from local storage except the app's logs.
|
|
*/
|
|
export const clearLocalStorage = () => {
|
|
const existingLogs = nullToUndefined(localStorage.getItem("logs"));
|
|
localStorage.clear();
|
|
if (existingLogs) {
|
|
localStorage.setItem("logs", existingLogs);
|
|
}
|
|
};
|