From 887bbd6e706e35e75cc5c36be6ad5ae3d0711a4c Mon Sep 17 00:00:00 2001 From: nidhal-labidi Date: Tue, 3 Sep 2024 15:03:14 +0200 Subject: [PATCH] fix: use Tailwind for styling instead of CSS Signed-off-by: nidhal-labidi --- .../where-are-you-at/src/routes/+page.svelte | 51 ++++--------------- 1 file changed, 9 insertions(+), 42 deletions(-) diff --git a/flottform/where-are-you-at/src/routes/+page.svelte b/flottform/where-are-you-at/src/routes/+page.svelte index 5320f16..277e5f7 100644 --- a/flottform/where-are-you-at/src/routes/+page.svelte +++ b/flottform/where-are-you-at/src/routes/+page.svelte @@ -63,12 +63,9 @@ $currentState = 'error'; }); }); - const copyLinkToClipboard = () => { - const flottformLink = (document.querySelector('.link-offer') as HTMLDivElement).innerText; - const copyToClipboardButton = document.querySelector( - '.copy-button-link-wrapper .copy-to-clipboard' - ) as HTMLButtonElement; - + const copyLinkToClipboard = (e: Event) => { + const copyToClipboardButton = e.target as HTMLButtonElement; + const flottformLink = (copyToClipboardButton.nextElementSibling as HTMLDivElement).innerText; navigator.clipboard .writeText(flottformLink) .then(() => { @@ -86,7 +83,7 @@ }; -
+
{#if $currentState === 'new'} - @@ -125,35 +124,3 @@ Error connecting to friend {/if}
- -