fix use of :key on "more" slot in MkReactionsViewer

This commit is contained in:
Hazelnoot 2025-05-29 12:42:58 -04:00
parent 7a003dec73
commit 2f91c66ba2

View file

@ -13,7 +13,9 @@ SPDX-License-Identifier: AGPL-3.0-only
tag="div" :class="$style.root" tag="div" :class="$style.root"
> >
<XReaction v-for="[reaction, count] in reactions" :key="reaction" :reaction="reaction" :count="count" :isInitial="initialReactions.has(reaction)" :note="note" @reactionToggled="onMockToggleReaction"/> <XReaction v-for="[reaction, count] in reactions" :key="reaction" :reaction="reaction" :count="count" :isInitial="initialReactions.has(reaction)" :note="note" @reactionToggled="onMockToggleReaction"/>
<slot v-if="hasMoreReactions" :key="'$more'" name="more"/> <div v-if="hasMoreReactions" :key="'$more'" :class="$style.moreReactions">
<slot name="more"/>
</div>
</SkTransitionGroup> </SkTransitionGroup>
</template> </template>
@ -102,7 +104,7 @@ watch([() => props.note.reactions, () => props.maxNumber], ([newSource, maxNumbe
position: absolute; position: absolute;
} }
.root { .root, .moreReactions {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;