mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-18 22:44:26 +01:00
update
This commit is contained in:
@@ -37,7 +37,10 @@ const DeprecatedRepost: Component<DeprecatedRepostProps> = (props) => {
|
||||
{' Reposted'}
|
||||
</div>
|
||||
</div>
|
||||
<Show when={event() != null} fallback={<Show when={eventQuery.isLoading}>loading</Show>}>
|
||||
<Show
|
||||
when={event() != null}
|
||||
fallback={<Show when={eventQuery.isLoading}>loading {eventId()}</Show>}
|
||||
>
|
||||
<TextNote event={event()} />
|
||||
</Show>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@ import useProfile from '@/clients/useProfile';
|
||||
import useConfig from '@/clients/useConfig';
|
||||
import usePubkey from '@/clients/usePubkey';
|
||||
import useCommands from '@/clients/useCommands';
|
||||
import useReactions from '@/clients/useReactions';
|
||||
// import useReactions from '@/clients/useReactions';
|
||||
import useDatePulser from '@/hooks/useDatePulser';
|
||||
import { formatRelative } from '@/utils/formatDate';
|
||||
import ColumnItem from '@/components/ColumnItem';
|
||||
@@ -33,6 +33,7 @@ const TextNote: Component<TextNoteProps> = (props) => {
|
||||
pubkey: props.event.pubkey,
|
||||
}));
|
||||
|
||||
/*
|
||||
const {
|
||||
reactions,
|
||||
isReactedBy,
|
||||
@@ -43,6 +44,8 @@ const TextNote: Component<TextNoteProps> = (props) => {
|
||||
}));
|
||||
|
||||
const isReactedByMe = createMemo(() => isReactedBy(pubkey()));
|
||||
*/
|
||||
const isReactedByMe = () => false;
|
||||
|
||||
const replyingToPubKeys = createMemo(() =>
|
||||
props.event.tags.filter((tag) => tag[0] === 'p').map((e) => e[1]),
|
||||
@@ -61,10 +64,12 @@ const TextNote: Component<TextNoteProps> = (props) => {
|
||||
};
|
||||
|
||||
const handleReaction: JSX.EventHandler<HTMLButtonElement, MouseEvent> = (ev) => {
|
||||
/*
|
||||
if (isReactedByMe()) {
|
||||
// TODO remove reaction
|
||||
return;
|
||||
}
|
||||
*/
|
||||
ev.preventDefault();
|
||||
commands
|
||||
.publishReaction({
|
||||
@@ -75,7 +80,7 @@ const TextNote: Component<TextNoteProps> = (props) => {
|
||||
notifyPubkey: props.event.pubkey,
|
||||
})
|
||||
.then(() => {
|
||||
reactionsQuery.refetch();
|
||||
// reactionsQuery.refetch();
|
||||
});
|
||||
};
|
||||
|
||||
@@ -141,7 +146,7 @@ const TextNote: Component<TextNoteProps> = (props) => {
|
||||
<HeartSolid />
|
||||
</Show>
|
||||
</button>
|
||||
<div class="text-sm text-zinc-400">{reactions().length}</div>
|
||||
{/* <div class="text-sm text-zinc-400">{reactions().length}</div> */}
|
||||
</div>
|
||||
<button class="h-4 w-4 text-zinc-400">
|
||||
<EllipsisHorizontal />
|
||||
|
||||
@@ -61,7 +61,7 @@ const Reaction: Component<ReactionProps> = (props) => {
|
||||
</div>
|
||||
</div>
|
||||
<div class="notification-event">
|
||||
<Show when={reactedEvent() != null} fallback="loading">
|
||||
<Show when={reactedEvent() != null} fallback={<>loading {eventId()}</>}>
|
||||
<TextNote event={reactedEvent()} />
|
||||
</Show>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user