aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(static)
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/(static)')
-rw-r--r--src/routes/(static)/bounties/+page.server.ts8
-rw-r--r--src/routes/(static)/bounties/+page.svelte2
-rw-r--r--src/routes/(static)/docs/+page.svelte8
-rw-r--r--src/routes/(static)/login/+page.server.ts8
-rw-r--r--src/routes/(static)/register/+page.svelte2
5 files changed, 18 insertions, 10 deletions
diff --git a/src/routes/(static)/bounties/+page.server.ts b/src/routes/(static)/bounties/+page.server.ts
index 00a94d76..f50f69c1 100644
--- a/src/routes/(static)/bounties/+page.server.ts
+++ b/src/routes/(static)/bounties/+page.server.ts
@@ -1,6 +1,12 @@
import { get } from "$lib/utils";
export const load = async () => {
- const users = [
+ const users: {
+ username: string;
+ merchant: any;
+ type: string;
+ amount: number;
+ user?: any;
+ }[] = [
{
username: "fustler",
merchant: "rrdrive",
diff --git a/src/routes/(static)/bounties/+page.svelte b/src/routes/(static)/bounties/+page.svelte
index c5bd99e7..1623a8a6 100644
--- a/src/routes/(static)/bounties/+page.svelte
+++ b/src/routes/(static)/bounties/+page.svelte
@@ -4,7 +4,7 @@
import Amount from "$comp/Amount.svelte";
let { data }: any = $props();
- let { users } = data;
+ let users = $derived(data.users);
let bounties = [
"Hardware Store",
diff --git a/src/routes/(static)/docs/+page.svelte b/src/routes/(static)/docs/+page.svelte
index 90d14ff1..c4d14a0b 100644
--- a/src/routes/(static)/docs/+page.svelte
+++ b/src/routes/(static)/docs/+page.svelte
@@ -5,15 +5,17 @@
import Code from "$comp/Code.svelte";
let { data } = $props();
- let { user, ro, token } = data;
+ let user = $derived(data.user);
+ let ro = $derived(data.ro);
+ let token = $derived(data.token);
let api = PUBLIC_DOMAIN.includes("localhost")
? `${PUBLIC_COINOS_URL}`
: `https://${PUBLIC_DOMAIN}/api`;
- let tokenSample = token ? `export token="${token}"` : `export token=<your auth token>`;
+ let tokenSample = $derived(token ? `export token="${token}"` : `export token=<your auth token>`);
- let roSample = `export token="${ro}"`;
+ let roSample = $derived(`export token="${ro}"`);
</script>
{#snippet cp(something)}
diff --git a/src/routes/(static)/login/+page.server.ts b/src/routes/(static)/login/+page.server.ts
index e4fb3815..eb0ad0bf 100644
--- a/src/routes/(static)/login/+page.server.ts
+++ b/src/routes/(static)/login/+page.server.ts
@@ -28,8 +28,8 @@ export const actions = {
await login(
user,
cookies,
- request.headers.get("cf-connecting-ip"),
- request.headers.get("host"),
+ request.headers.get("cf-connecting-ip") ?? "",
+ request.headers.get("host") ?? "",
);
} catch (e) {
const { message } = e as Error;
@@ -53,8 +53,8 @@ export const actions = {
headers: {
"content-type": "application/json",
accept: "application/json",
- "cf-connecting-ip": request.headers.get("cf-connecting-ip"),
- "x-forwarded-host": request.headers.get("host"),
+ "cf-connecting-ip": request.headers.get("cf-connecting-ip") ?? "",
+ "x-forwarded-host": request.headers.get("host") ?? "",
},
});
diff --git a/src/routes/(static)/register/+page.svelte b/src/routes/(static)/register/+page.svelte
index a8d05e42..843fb129 100644
--- a/src/routes/(static)/register/+page.svelte
+++ b/src/routes/(static)/register/+page.svelte
@@ -47,7 +47,7 @@
});
let username: string | undefined = $state();
- let { index } = $state(data);
+ let index = $state(data.index);
let revealPassword = $state(false);
let cleared;