```text
feat: Add type prop to CreateNewAdventure component The code changes include adding a new prop called "type" to the CreateNewAdventure component in order to specify the type of adventure being created. This prop is passed from the parent component and used to set the "type" property of the newAdventure object. This allows for more flexibility in creating adventures with different types.
This commit is contained in:
@@ -67,7 +67,7 @@ export async function removeAdventure(
|
||||
if (response.ok) {
|
||||
// remove adventure from array where id matches
|
||||
adventureArray = adventureArray.filter(
|
||||
(adventure) => adventure.id !== adventure.id
|
||||
(existingAdventure) => existingAdventure.id !== adventure.id
|
||||
);
|
||||
// showToast("Adventure removed successfully!");
|
||||
} else {
|
||||
@@ -75,6 +75,8 @@ export async function removeAdventure(
|
||||
adventureArray = [];
|
||||
}
|
||||
|
||||
console.log(adventureArray);
|
||||
|
||||
return adventureArray;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user