Skip to content

Commit

Permalink
Merge branch 'feat/storage-message' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
camewell071 committed Jan 15, 2024
2 parents 71b02dd + 1f2fafc commit a99acea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/modules/Whitelist/steps/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ const Steps = () => {
content={item}
isLoading={index === 0 && submitting}
isActive={!!item.isActive}
isDone={!!item.isDone}
/>
);
})}
Expand Down
10 changes: 8 additions & 2 deletions src/utils/storage/allowlist.storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ interface IStorageItem {
class AllowListStorage {
private static STORAGE_KEY = 'ALLOW_LIST_STORAGE';

public static getStorage = () => storage.get(this.STORAGE_KEY) || '';
public static setStorage = (payload: IStorageItem) => storage.set(this.STORAGE_KEY, payload);
public static getStorage = () => {
const data = storage.get(this.STORAGE_KEY);
if (data) {
return JSON.parse(data as string)
}
return data
};
public static setStorage = (payload: IStorageItem) => storage.set(this.STORAGE_KEY, JSON.stringify(payload));
}

export default AllowListStorage

0 comments on commit a99acea

Please sign in to comment.