aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/launch/ticket
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-12-01 20:04:13 -0800
committerAdam Soltys <[email protected]>2023-12-01 20:04:13 -0800
commit216a600224fde22ce76b367557a02094ec693886 (patch)
treed1189bbaa39db204633523132a7d4767b952717d /src/routes/(app)/launch/ticket
parent7d9bc1f54dfd04172e8d6d43ebc2efd6f407e833 (diff)
downloadcoinos-ui-216a600224fde22ce76b367557a02094ec693886.tar.gz
coinos-ui-216a600224fde22ce76b367557a02094ec693886.zip
prettier
Diffstat (limited to 'src/routes/(app)/launch/ticket')
-rw-r--r--src/routes/(app)/launch/ticket/+page.server.js14
-rw-r--r--src/routes/(app)/launch/ticket/+page.svelte56
2 files changed, 37 insertions, 33 deletions
diff --git a/src/routes/(app)/launch/ticket/+page.server.js b/src/routes/(app)/launch/ticket/+page.server.js
index 0362eb7d..7b51e679 100644
--- a/src/routes/(app)/launch/ticket/+page.server.js
+++ b/src/routes/(app)/launch/ticket/+page.server.js
@@ -1,9 +1,11 @@
-import { get } from '$lib/utils';
+import { get } from "$lib/utils";
export const load = async ({ cookies, parent }) => {
- let { user } = await parent();
- let tickets = await get('/tickets');
- let ticket = tickets.findIndex((t) => user.accounts.find((a) => a.asset === t));
- let asset = tickets[ticket];
- return { asset, ticket };
+ let { user } = await parent();
+ let tickets = await get("/tickets");
+ let ticket = tickets.findIndex((t) =>
+ user.accounts.find((a) => a.asset === t)
+ );
+ let asset = tickets[ticket];
+ return { asset, ticket };
};
diff --git a/src/routes/(app)/launch/ticket/+page.svelte b/src/routes/(app)/launch/ticket/+page.svelte
index 3879abcd..6b16e804 100644
--- a/src/routes/(app)/launch/ticket/+page.svelte
+++ b/src/routes/(app)/launch/ticket/+page.svelte
@@ -1,35 +1,37 @@
<script>
- export let data;
- let { asset, ticket } = data;
+ export let data;
+ let { asset, ticket } = data;
</script>
<div class="mx-auto h-screen flex items-center justify-center px-4">
- <div class="font-normal text-gray-800 mx-auto mb-8 space-y-8">
- <h1 class="mb-4 text-4xl font-bold leading-none tracking-tight text-gray-800 text-center">
- Your Ticket
- </h1>
+ <div class="font-normal text-gray-800 mx-auto mb-8 space-y-8">
+ <h1
+ class="mb-4 text-4xl font-bold leading-none tracking-tight text-gray-800 text-center"
+ >
+ Your Ticket
+ </h1>
- <p>
- We've minted your ticket as an <a
- href={`https://blockstream.info/liquid/asset/${asset}`}
- class="underline">NFT on the Liquid Blockchain</a
- > as a proof of purchase and commemorative token.
- </p>
+ <p>
+ We've minted your ticket as an <a
+ href={`https://blockstream.info/liquid/asset/${asset}`}
+ class="underline">NFT on the Liquid Blockchain</a
+ > as a proof of purchase and commemorative token.
+ </p>
- <img
- src={`/tickets/${(ticket + 1).toString().padStart(2, '0')}.png`}
- class="w-full max-w-[800px]"
- alt="Ticket"
- />
+ <img
+ src={`/tickets/${(ticket + 1).toString().padStart(2, "0")}.png`}
+ class="w-full max-w-[800px]"
+ alt="Ticket"
+ />
- <div class="w-full flex">
- <a href="/" class="mx-auto">
- <button
- class="bg-black text-white border rounded-full px-8 py-4 font-bold hover:opacity-80 text-2xl"
- >
- Done
- </button>
- </a>
- </div>
- </div>
+ <div class="w-full flex">
+ <a href="/" class="mx-auto">
+ <button
+ class="bg-black text-white border rounded-full px-8 py-4 font-bold hover:opacity-80 text-2xl"
+ >
+ Done
+ </button>
+ </a>
+ </div>
+ </div>
</div>