wip: refactor

This commit is contained in:
Ren Amamiya
2023-08-15 21:13:58 +07:00
parent 6e28bcdb96
commit 2d53019c10
36 changed files with 603 additions and 552 deletions

View File

@@ -10,8 +10,6 @@ import { NoteZap } from '@shared/notes/actions/zap';
import { BLOCK_KINDS } from '@stores/constants';
import { useWidgets } from '@stores/widgets';
import { useAccount } from '@utils/hooks/useAccount';
export function NoteActions({
id,
pubkey,
@@ -23,7 +21,6 @@ export function NoteActions({
noOpenThread?: boolean;
root?: string;
}) {
const { account } = useAccount();
const setWidget = useWidgets((state) => state.setWidget);
return (
@@ -33,7 +30,7 @@ export function NoteActions({
<NoteReply id={id} pubkey={pubkey} root={root} />
<NoteReaction id={id} pubkey={pubkey} />
<NoteRepost id={id} pubkey={pubkey} />
{(account?.lud06 || account?.lud16) && <NoteZap id={id} />}
<NoteZap id={id} />
</div>
{!noOpenThread && (
<>

View File

@@ -67,13 +67,10 @@ export function NoteMetadata({ id }: { id: string }) {
if (status === 'loading') {
return (
<div>
<div className="absolute left-[18px] top-14 h-[calc(100%-6.4rem)] w-0.5 bg-gradient-to-t from-white/20 to-white/10" />
<div className="relative z-10 flex items-center gap-3 pb-3">
<div className="mt-2 h-6 w-11 shrink-0"></div>
<div className="mt-2 inline-flex h-6">
<LoaderIcon className="h-4 w-4 animate-spin text-white" />
</div>
<div className="relative z-10 flex items-center gap-3 pb-3">
<div className="mt-2 h-6 w-11 shrink-0"></div>
<div className="mt-2 inline-flex h-6">
<LoaderIcon className="h-4 w-4 animate-spin text-white" />
</div>
</div>
);