Add import and export functionality

This commit is contained in:
Sean Morley
2024-03-29 22:20:21 +00:00
parent 97d98003f6
commit bd5e1a813b
5 changed files with 43 additions and 1 deletions

View File

@@ -18,6 +18,10 @@ export function getNextId() {
return nextId;
}
export function setAdventures(importArray: Adventure[]) {
adventures = importArray
}
export function addAdventure(adventure: Adventure) {
adventures = [...adventures, adventure];
if (isBrowser) {