refactor note component

This commit is contained in:
Ren Amamiya
2023-07-15 12:20:09 +07:00
parent 41460436df
commit 1f18d8bb44
38 changed files with 1174 additions and 884 deletions

View File

@@ -0,0 +1,29 @@
import * as Tooltip from '@radix-ui/react-tooltip';
import { NoteReaction } from '@shared/notes/actions/reaction';
import { NoteReply } from '@shared/notes/actions/reply';
import { NoteRepost } from '@shared/notes/actions/repost';
import { NoteZap } from '@shared/notes/actions/zap';
export function NoteActions({
id,
rootID,
eventPubkey,
}: {
id: string;
rootID?: string;
eventPubkey: string;
}) {
return (
<Tooltip.Provider>
<div className="-ml-1 mt-4 inline-flex w-full items-center justify-between">
<div className="inline-flex items-center gap-2">
<NoteReaction />
<NoteZap />
<NoteRepost id={id} pubkey={eventPubkey} />
<NoteReply id={id} rootID={rootID} pubkey={eventPubkey} />
</div>
</div>
</Tooltip.Provider>
);
}