diff --git a/src/routes/community/[area]/+page.svelte b/src/routes/community/[area]/+page.svelte index 0e8521a6..9768127f 100644 --- a/src/routes/community/[area]/+page.svelte +++ b/src/routes/community/[area]/+page.svelte @@ -3,7 +3,6 @@ import { browser } from '$app/environment'; import { goto } from '$app/navigation'; - import { page } from '$app/stores'; import { Footer, Header, @@ -851,9 +850,9 @@ - {$page.data.name} - BTC Map Community + {name ? name + ' - ' : ''}BTC Map Community - + {#if lightning && lightning.type === 'address'} @@ -889,7 +888,7 @@
{/if}

- {name} + {name || 'BTC Map Community'}

{#if org} @@ -919,26 +918,28 @@ {:else} {#if dataInitialized} @@ -980,7 +981,7 @@

- {name} Map + {name || 'BTC Map Community'} Map

diff --git a/src/routes/tagger/[id]/+page.ts b/src/routes/tagger/[id]/+page.ts index cf4f5ee2..ba560ff3 100644 --- a/src/routes/tagger/[id]/+page.ts +++ b/src/routes/tagger/[id]/+page.ts @@ -7,14 +7,15 @@ axiosRetry(axios, { retries: 3, retryDelay: axiosRetry.exponentialDelay }); // @ts-expect-error export async function load({ params }) { const { id } = params; + try { + const response = await axios.get(`https://api.btcmap.org/v2/users/${id}`); - const response = await axios.get(`https://api.btcmap.org/v2/users/${id}`); + const data = response.data; - const data = response.data; - - if (data) { - return { user: data.id, username: data['osm_json']['display_name'] }; + if (data) { + return { user: data.id, username: data['osm_json']['display_name'] }; + } + } catch (err) { + error(404, 'User Not Found'); } - - error(404, 'User Not Found'); }