aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/launch/ticket
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-10-18 21:03:27 -0700
committerAdam Soltys <[email protected]>2022-10-18 21:03:27 -0700
commitad24f34434368d3767fd147d80d45adc3c28f106 (patch)
treef98eea88a95a2c1fbe79283cfa3f77e4ff737449 /src/routes/launch/ticket
parent02af363d2f0d552a72dc1c90bf8d785e04465d3a (diff)
downloadcoinos-ui-ad24f34434368d3767fd147d80d45adc3c28f106.tar.gz
coinos-ui-ad24f34434368d3767fd147d80d45adc3c28f106.zip
tickets wip
Diffstat (limited to 'src/routes/launch/ticket')
-rw-r--r--src/routes/launch/ticket/+page.server.js9
-rw-r--r--src/routes/launch/ticket/+page.svelte32
2 files changed, 37 insertions, 4 deletions
diff --git a/src/routes/launch/ticket/+page.server.js b/src/routes/launch/ticket/+page.server.js
new file mode 100644
index 00000000..59ea966e
--- /dev/null
+++ b/src/routes/launch/ticket/+page.server.js
@@ -0,0 +1,9 @@
+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));
+ console.log("TICK", ticket)
+ return { ticket };
+};
diff --git a/src/routes/launch/ticket/+page.svelte b/src/routes/launch/ticket/+page.svelte
index 229c18f0..2585c57c 100644
--- a/src/routes/launch/ticket/+page.svelte
+++ b/src/routes/launch/ticket/+page.svelte
@@ -1,4 +1,28 @@
-<img
- src={`/tickets/${(ticket + 1).toString().padStart(2, '0')}.png`}
- class="w-full max-w-[800px]"
-/>
+<script>
+ export let data;
+ let { 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>
+
+ <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>