frontend/app/components/notes/reactions/index.vue
Jesse Wierzbinski f5918cc7f9
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 1s
Deploy to GitHub Pages / build (push) Failing after 0s
Deploy to GitHub Pages / deploy (push) Has been skipped
Docker / build (push) Failing after 0s
Mirror to Codeberg / Mirror (push) Failing after 0s
refactor: ♻️ Simplify Note code with a provide/inject pattern
2026-01-09 23:10:45 +01:00

19 lines
527 B
Vue

<template>
<div class="flex flex-row gap-1 flex-wrap">
<Reaction
v-for="reaction in note.reactions"
:key="reaction.name"
:reaction="reaction"
:emoji="note.emojis.find(e => `:${e.shortcode}:` === reaction.name)"
/>
</div>
</template>
<script lang="ts" setup>
import { key } from "../provider";
import Reaction from "./reaction.vue";
// biome-ignore lint/style/noNonNullAssertion: We want an error if not provided
const { note } = inject(key)!;
</script>