Creating a Database for the Menu
We will create a new database for the menu; add the following method to Menu.js
.
openDB: async () => {
return await idb.openDB("cm-menu", 1, {
async upgrade(db) {
await db.createObjectStore("categories", { keyPath: 'name' });
}
})
},