add simple load test and receive test

This commit is contained in:
Paul Miller
2023-06-02 17:40:14 -05:00
parent 7361e0a26b
commit 2b49b04f08
8 changed files with 192 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ import { useCopy } from "~/utils/useCopy";
export function CopyableQR(props: { value: string }) {
const [copy, copied] = useCopy({ copiedTimeout: 1000 });
return (
<div class="w-full bg-white rounded-xl relative" onClick={() => copy(props.value)}>
<div id="qr" class="w-full bg-white rounded-xl relative" onClick={() => copy(props.value)}>
<Show when={copied()}>
<div class="absolute w-full h-full bg-neutral-900/60 z-50 rounded-xl flex flex-col items-center justify-center transition-all">
<p class="text-xl font-bold">Copied</p>

View File

@@ -1,5 +1,18 @@
import { Back } from "~/assets/svg/Back";
export function BackButton(props: { onClick: () => void, title?: string }) {
return (<button onClick={() => props.onClick()} class="text-m-red active:text-m-red/80 text-xl font-semibold no-underline md:hidden flex items-center"><Back />{props.title ? props.title : "Home"}</button>)
export function BackButton(props: {
onClick: () => void;
title?: string;
showOnDesktop?: boolean;
}) {
return (
<button
onClick={() => props.onClick()}
class="text-m-red active:text-m-red/80 text-xl font-semibold no-underline md:hidden flex items-center"
classList={{ "md:!flex": props.showOnDesktop }}
>
<Back />
{props.title ? props.title : "Home"}
</button>
);
}

View File

@@ -266,7 +266,7 @@ export default function Receive() {
<SafeArea>
<DefaultMain>
<Show when={receiveState() === "show"} fallback={<BackLink />}>
<BackButton onClick={() => setReceiveState("edit")} title="Edit" />
<BackButton onClick={() => setReceiveState("edit")} title="Edit" showOnDesktop />
</Show>
<LargeHeader action={receiveState() === "show" && <Indicator>Checking</Indicator>}>
Receive Bitcoin