mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-01-17 21:24:22 +01:00
fix some lints
This commit is contained in:
@@ -236,7 +236,7 @@ export function CombinedActivity(props: { limit?: number }) {
|
||||
const txs = await state.mutiny_wallet?.list_onchain() as OnChainTx[];
|
||||
const invoices = await state.mutiny_wallet?.list_invoices() as MutinyInvoice[];
|
||||
|
||||
let activity: ActivityItem[] = [];
|
||||
const activity: ActivityItem[] = [];
|
||||
|
||||
txs.forEach((tx) => {
|
||||
activity.push({ type: "onchain", item: tx, time: tx.confirmation_time?.Confirmed?.time || Date.now() })
|
||||
|
||||
@@ -4,6 +4,10 @@ import { useMegaStore } from "~/state/megaStore";
|
||||
import { satsToUsd } from "~/utils/conversions";
|
||||
import { AmountEditable } from "./AmountEditable";
|
||||
|
||||
const noop = () => {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
const KeyValue: ParentComponent<{ key: string, gray?: boolean }> = (props) => {
|
||||
return (
|
||||
<div class="flex justify-between items-center" classList={{ "text-neutral-400": props.gray }}>
|
||||
@@ -54,7 +58,7 @@ export function AmountCard(props: { amountSats: string, fee?: string, initialOpe
|
||||
<KeyValue key="Amount">
|
||||
<Show when={props.isAmountEditable} fallback={<InlineAmount amount={props.amountSats} />
|
||||
}>
|
||||
<AmountEditable initialOpen={props.initialOpen ?? false} initialAmountSats={props.amountSats.toString()} setAmountSats={props.setAmountSats ? props.setAmountSats : () => { }} />
|
||||
<AmountEditable initialOpen={props.initialOpen ?? false} initialAmountSats={props.amountSats.toString()} setAmountSats={props.setAmountSats ? props.setAmountSats : noop} />
|
||||
</Show>
|
||||
</KeyValue>
|
||||
<KeyValue gray key="+ Fee">
|
||||
@@ -74,7 +78,7 @@ export function AmountCard(props: { amountSats: string, fee?: string, initialOpe
|
||||
<KeyValue key="Amount">
|
||||
<Show when={props.isAmountEditable} fallback={<InlineAmount amount={props.amountSats} />
|
||||
}>
|
||||
<AmountEditable initialOpen={props.initialOpen ?? false} initialAmountSats={props.amountSats.toString()} setAmountSats={props.setAmountSats ? props.setAmountSats : () => { }} />
|
||||
<AmountEditable initialOpen={props.initialOpen ?? false} initialAmountSats={props.amountSats.toString()} setAmountSats={props.setAmountSats ? props.setAmountSats : noop} />
|
||||
</Show>
|
||||
</KeyValue>
|
||||
<USDShower amountSats={props.amountSats} />
|
||||
|
||||
@@ -5,6 +5,7 @@ import close from "~/assets/icons/close.svg";
|
||||
import { SubmitHandler } from '@modular-forms/solid';
|
||||
import { ContactItem } from '~/state/contacts';
|
||||
import { ContactForm } from './ContactForm';
|
||||
import { showToast } from './Toaster';
|
||||
|
||||
export function ContactViewer(props: { contact: ContactItem, gradient: string, saveContact: (contact: ContactItem) => void }) {
|
||||
const [isOpen, setIsOpen] = createSignal(false);
|
||||
@@ -58,7 +59,7 @@ export function ContactViewer(props: { contact: ContactItem, gradient: string, s
|
||||
|
||||
<div class="flex w-full gap-2">
|
||||
<Button layout="flex" intent="green" onClick={() => setIsEditing(true)}>Edit</Button>
|
||||
<Button intent="blue" onClick={() => { }}>Pay</Button>
|
||||
<Button intent="blue" onClick={() => { showToast({ title: "Unimplemented", description: "We don't do that yet" }) }}>Pay</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Match>
|
||||
|
||||
@@ -12,7 +12,7 @@ export function ImportExport() {
|
||||
const [state, _] = useMegaStore()
|
||||
|
||||
async function handleSave() {
|
||||
let json = await state.node_manager?.export_json()
|
||||
const json = await state.node_manager?.export_json()
|
||||
downloadTextFile(json || "", "mutiny-state.json")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Show, createSignal, onMount } from "solid-js";
|
||||
import { Button, ButtonLink, SmallHeader, VStack } from "./layout";
|
||||
import { useMegaStore } from "~/state/megaStore";
|
||||
import { showToast } from "./Toaster";
|
||||
|
||||
export function OnboardWarning() {
|
||||
const [state, actions] = useMegaStore();
|
||||
@@ -25,7 +26,7 @@ export function OnboardWarning() {
|
||||
Do you want to restore an existing Mutiny Wallet?
|
||||
</p>
|
||||
<div class="w-full flex gap-2">
|
||||
<Button intent="green" onClick={() => { }}>Restore</Button>
|
||||
<Button intent="green" onClick={() => { showToast({ title: "Unimplemented", description: "We don't do that yet" }) }}>Restore</Button>
|
||||
<Button onClick={actions.dismissRestorePrompt}>Nope</Button>
|
||||
</div>
|
||||
</VStack>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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>)
|
||||
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>)
|
||||
}
|
||||
@@ -123,7 +123,7 @@ export const NiceP: ParentComponent = (props) => {
|
||||
|
||||
export const TinyButton: ParentComponent<{ onClick: () => void }> = (props) => {
|
||||
return (
|
||||
<button class="py-1 px-2 rounded-lg bg-white/10" onClick={props.onClick}>
|
||||
<button class="py-1 px-2 rounded-lg bg-white/10" onClick={() => props.onClick()}>
|
||||
{props.children}
|
||||
</button>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user