v1.5.2/api update to handle remove localstorage key

This commit is contained in:
2020-07-25 23:16:41 -04:00
parent a06cc15040
commit a3750859e3
2 changed files with 10 additions and 2 deletions
+9 -1
View File
@@ -61,7 +61,15 @@ export const updateLocalData = (data) => {
window.localStorage.setItem('WatchParty', JSON.stringify(Object.assign({}, LocalData(), data)));
};
export const emptyLocalData = () => window.localStorage.removeItem('WatchParty');
export const removeLocalData = (key) => {
var data = LocalData();
delete data[key];
window.localStorage.setItem('WatchParty', JSON.stringify(data));
};
export const emptyLocalData = () => {
window.localStorage.removeItem('WatchParty');
};
export const getUserUid = async () =>
new Promise((resolve, reject) => {