More bugfixing/cleanup
This commit is contained in:
@@ -146,7 +146,7 @@
|
||||
<tr class="hover:bg-base-300">
|
||||
<td>{row.name}</td>
|
||||
<td>
|
||||
<div class="badge {STATUS_BADGE[row.status]}">
|
||||
<div class="badge {STATUS_BADGE[row.status as VerificationStatus]}">
|
||||
{row.status}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { page } from "$app/state";
|
||||
import { goto } from "$app/navigation";
|
||||
import { api } from "$lib/api";
|
||||
import { Activity, cmToIn, kgToLb } from "@blade-and-brawn/domain";
|
||||
import type { ActivityVerifications } from "@blade-and-brawn/domain";
|
||||
import type { VerificationStatus } from "@blade-and-brawn/api";
|
||||
import { onMount } from "svelte";
|
||||
import type { PageProps } from "./$types";
|
||||
|
||||
async function loadVerification(id: string) {
|
||||
return await api.verifications({ id }).get();
|
||||
@@ -104,7 +104,8 @@
|
||||
);
|
||||
}
|
||||
|
||||
const id = page.params.id;
|
||||
let { params }: PageProps = $props();
|
||||
const id = $derived(params.id);
|
||||
|
||||
let verification = $state<VerificationDetail | null>(null);
|
||||
let loading = $state(true);
|
||||
@@ -222,7 +223,7 @@
|
||||
{@const v = verification}
|
||||
<div class="w-full flex items-center gap-3 flex-wrap mb-6">
|
||||
<h1 class="text-xl font-semibold">{v.name}</h1>
|
||||
<div class="badge {STATUS_BADGE[v.status]}">{v.status}</div>
|
||||
<div class="badge {STATUS_BADGE[v.status as VerificationStatus]}">{v.status}</div>
|
||||
<span class="text-sm opacity-70"
|
||||
>{v.gender} · age {v.age} · {Math.round(kgToLb(v.weight))} lb</span
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user