1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-28 09:19:37 +02:00

Refactor AdventureCard component and add new adventure page

This commit is contained in:
Sean Morley 2024-04-27 20:24:25 +00:00
parent ba84fbdcf3
commit 62109a41a6
5 changed files with 65 additions and 4 deletions

View file

@ -14,7 +14,6 @@
export let id: Number | undefined = undefined;
export let regionId: String | undefined = undefined;
export let visited: Boolean | undefined = undefined;
export let countryCode: String | undefined = undefined;
function remove() {
dispatch("remove", id);
@ -35,7 +34,8 @@
}
function moreInfo() {
goto(`/worldtravel/${countryCode}/${regionId}`);
console.log(id);
goto(`/adventure/${id}`);
}
</script>
@ -60,6 +60,7 @@
{#if type == "mylog"}
<button class="btn btn-primary" on:click={edit}>Edit</button>
<button class="btn btn-secondary" on:click={remove}>Remove</button>
<button class="btn btn-primary" on:click={moreInfo}>Info</button>
{/if}
{#if type == "featured"}
<button class="btn btn-primary" on:click={add}>Add</button>