mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-03 18:50:30 +08:00
Use twemojis for reactions
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import Border from "./Border.svelte";
|
||||
import Icon from "./Icon.svelte";
|
||||
import Popover from "./Popover.svelte";
|
||||
import { twemoji } from "@app/lib/utils";
|
||||
|
||||
interface Props {
|
||||
reactions?: Reaction[];
|
||||
@@ -62,6 +63,7 @@
|
||||
({ emoji }) => emoji === reaction,
|
||||
)}
|
||||
<button
|
||||
use:twemoji={{ exclude: ["21a9"] }}
|
||||
class:active={Boolean(lookedUpReaction)}
|
||||
onclick={() =>
|
||||
select(lookedUpReaction || { emoji: reaction, authors: [] })}>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
import type { Author } from "@bindings/cob/Author";
|
||||
import type { Reaction } from "@bindings/cob/Reaction";
|
||||
|
||||
import { twemoji } from "@app/lib/utils";
|
||||
|
||||
interface Props {
|
||||
reactions: Reaction[];
|
||||
handleReaction?: (authors: Author[], reaction: string) => Promise<void>;
|
||||
@@ -42,12 +44,12 @@
|
||||
await handleReaction(authors, emoji);
|
||||
}
|
||||
}}>
|
||||
<span>{emoji}</span>
|
||||
<span use:twemoji={{ exclude: ["21a9"] }}>{emoji}</span>
|
||||
<span>{authors.length}</span>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="reaction txt-tiny" style="padding: 2px 4px;">
|
||||
<span>{emoji}</span>
|
||||
<span use:twemoji={{ exclude: ["21a9"] }}>{emoji}</span>
|
||||
<span>{authors.length}</span>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user