Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Commit 5d6b813

Browse files
committed
a little cleanup work
1 parent 34f55b0 commit 5d6b813

22 files changed

Lines changed: 500 additions & 309 deletions

src/assets/plus.png

-215 Bytes
Binary file not shown.

src/assets/svg/Back.tsx

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/assets/svg/Clock.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/assets/svg/Globe.tsx

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/assets/svg/Paste.tsx

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/assets/svg/Private.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/assets/svg/Scan.tsx

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/components/Activity.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@ import { cache, createAsync, revalidate, useNavigate } from "@solidjs/router";
33
import { Plus, Save, Search, Shuffle } from "lucide-solid";
44
import { createEffect, createSignal, For, Match, Show, Switch } from "solid-js";
55

6-
import {
7-
ActivityDetailsModal,
8-
ButtonCard,
9-
HackActivityType,
10-
NiceP
11-
} from "~/components";
6+
import { ActivityDetailsModal, ButtonCard, NiceP } from "~/components";
127
import { useI18n } from "~/i18n/context";
138
import { useMegaStore } from "~/state/megaStore";
149
import { timeAgo } from "~/utils";
1510

1611
import { GenericItem } from "./GenericItem";
1712

13+
export type HackActivityType =
14+
| "Lightning"
15+
| "OnChain"
16+
| "ChannelOpen"
17+
| "ChannelClose";
18+
1819
export interface IActivityItem {
1920
kind: HackActivityType;
2021
id: string;

src/components/ActivityDetailsModal.tsx

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import {
1010
createMemo,
1111
createResource,
1212
Match,
13+
ParentComponent,
1314
Show,
1415
Suspense,
1516
Switch
1617
} from "solid-js";
1718

1819
import {
19-
ActivityAmount,
2020
AmountFiat,
2121
AmountSats,
2222
FancyCard,
@@ -56,6 +56,39 @@ interface OnChainTx {
5656
labels: string[];
5757
}
5858

59+
const ActivityAmount: ParentComponent<{
60+
amount: string;
61+
price: number;
62+
positive?: boolean;
63+
center?: boolean;
64+
}> = (props) => {
65+
return (
66+
<div
67+
class="flex flex-col gap-1"
68+
classList={{
69+
"items-end": !props.center,
70+
"items-center": props.center
71+
}}
72+
>
73+
<div
74+
class="justify-end"
75+
classList={{ "text-m-green": props.positive }}
76+
>
77+
<AmountSats
78+
amountSats={Number(props.amount)}
79+
icon={props.positive ? "plus" : undefined}
80+
/>
81+
</div>
82+
<div class="text-sm text-white/70">
83+
<AmountFiat
84+
amountSats={Number(props.amount)}
85+
denominationSize="sm"
86+
/>
87+
</div>
88+
</div>
89+
);
90+
};
91+
5992
export const OVERLAY = "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm";
6093
export const DIALOG_POSITIONER =
6194
"fixed inset-0 z-50 flex items-center justify-center";

src/components/ActivityItem.tsx

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)