KSlab/src/utils/localStorage.ts

9 lines
214 B
TypeScript
Raw Normal View History

import { CardTypes } from "../types"
2024-10-05 18:33:07 +00:00
export function updateLocalStorage(
location: CardTypes,
2024-10-05 18:33:07 +00:00
collection: unknown[] | Record<string, unknown>
) {
localStorage.setItem(location, JSON.stringify(collection))
}