diff --git a/src/utils/function-common.tsx b/src/utils/function-common.tsx new file mode 100644 index 0000000..c263afd --- /dev/null +++ b/src/utils/function-common.tsx @@ -0,0 +1,7 @@ +export function setLocalStorage(name: string, listData: Array) { + localStorage.setItem(name, JSON.stringify(listData)); +} + +export const getLocalStorage = (name: string) => { + return JSON.parse(localStorage.getItem(name) as string); +};