Skip to content

Commit

Permalink
use client side routing for all links
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght committed Dec 8, 2023
1 parent 466bf8e commit 5c7b00e
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/components/AppCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
{#if link}
<a
href={link}
target={text === 'Web' ? '_self' : '_blank'}
rel="noreferrer"
target={text === 'Web' ? null : '_blank'}
rel={text === 'Web' ? null : 'noreferrer'}
class="text-2xl font-semibold text-link transition-colors hover:text-hover"
>
<div
Expand Down
4 changes: 2 additions & 2 deletions src/components/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
{#each links as link}
<a
href={link.link}
target={link.external ? '_blank' : '_self'}
rel="noreferrer"
target={link.external ? '_blank' : null}
rel={link.external ? 'noreferrer' : null}
class="mx-2.5 {link.name !== 'Cypherpunks'
? 'mb-2.5 xl:mb-0'
: ''} text-sm text-link transition-colors hover:text-hover dark:text-white/50 dark:hover:text-link"
Expand Down
4 changes: 2 additions & 2 deletions src/components/LatestTagger.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
href={action === 'delete'
? `https://www.openstreetmap.org/${deleteLink[0]}/${deleteLink[1]}`
: `/merchant/${merchantId}`}
target={action === 'delete' ? '_blank' : '_self'}
rel="noreferrer"
target={action === 'delete' ? '_blank' : null}
rel={action === 'delete' ? 'noreferrer' : null}
class="break-all text-link transition-colors hover:text-hover"
>{location}
{#if action === 'delete'}
Expand Down
4 changes: 2 additions & 2 deletions src/components/NavDropdownDesktop.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
{#each links as link}
<a
href={link.url}
target={link.external ? '_blank' : '_self'}
rel="noreferrer"
target={link.external ? '_blank' : null}
rel={link.external ? 'noreferrer' : null}
class="flex items-center justify-center bg-link p-4 text-xl font-semibold text-white hover:bg-hover {link.icon ===
top
? 'rounded-t-2xl'
Expand Down
4 changes: 2 additions & 2 deletions src/components/NavDropdownMobile.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
{#each links as link}
<a
href={link.url}
target={link.external ? '_blank' : '_self'}
rel="noreferrer"
target={link.external ? '_blank' : null}
rel={link.external ? 'noreferrer' : null}
class="flex w-full items-center text-xl text-link dark:text-white"
>
<span
Expand Down
4 changes: 2 additions & 2 deletions src/components/PrimaryButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
{#if link}
<a
href={link}
target={external ? '_blank' : '_self'}
rel={external ? 'noreferrer' : ''}
target={external ? '_blank' : null}
rel={external ? 'noreferrer' : null}
class="block bg-link text-center font-semibold text-white hover:bg-hover {style} transition-colors"
>
{text}
Expand Down
4 changes: 2 additions & 2 deletions src/components/ProfileActivity.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
href={action === 'delete'
? `https://www.openstreetmap.org/${deleteLink[0]}/${deleteLink[1]}`
: `/merchant/${merchantId}`}
target={action === 'delete' ? '_blank' : '_self'}
rel="noreferrer"
target={action === 'delete' ? '_blank' : null}
rel={action === 'delete' ? 'noreferrer' : null}
class="break-all text-link transition-colors hover:text-hover"
>{location}
{#if action === 'delete'}
Expand Down
8 changes: 4 additions & 4 deletions src/components/Tip.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<div class="!my-12">
<a
href={type === 'url' ? destination : `lightning:${destination}`}
target={type === 'url' ? '_blank' : '_self'}
rel="noreferrer"
target={type === 'url' ? '_blank' : null}
rel={type === 'url' ? 'noreferrer' : null}
class="w-full rounded-xl bg-link p-3 px-5 text-center font-semibold text-white transition-colors hover:bg-hover md:text-lg"
>
<!-- lightning icon -->
Expand All @@ -38,8 +38,8 @@
{:else}
<a
href={type === 'url' ? destination : `lightning:${destination}`}
target={type === 'url' ? '_blank' : '_self'}
rel="noreferrer"
target={type === 'url' ? '_blank' : null}
rel={type === 'url' ? 'noreferrer' : null}
class="w-full rounded-lg border border-link py-2 text-center text-sm font-semibold text-link hover:border-white hover:bg-link hover:text-white md:w-20 md:py-1 {style} transition-colors"
>
<!-- lightning icon -->
Expand Down
4 changes: 2 additions & 2 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
<p>{app.type}</p>
<a
href={app.link}
target={app.type === 'Web' ? '_self' : '_blank'}
rel="noreferrer"
target={app.type === 'Web' ? null : '_blank'}
rel={app.type === 'Web' ? null : 'noreferrer'}
class="block rounded-full bg-link p-3 text-white transition-colors hover:bg-hover"
>
<Icon
Expand Down
4 changes: 2 additions & 2 deletions src/routes/communities/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
};
const chartSync = (status: boolean) => {
if (!status && initialRenderComplete) {
if (!status) {
if (chartRendered) {
continentChart.data.datasets[0].data = [
africa?.length || 0,
Expand All @@ -168,7 +168,7 @@
}
};
$: $areas && $areas.length && communities && communities.length && chartSync($syncStatus);
$: $areas && $areas.length && communities && communities.length && initialRenderComplete && chartSync($syncStatus);
let section: string;
const sections = [
Expand Down

0 comments on commit 5c7b00e

Please sign in to comment.