diff --git a/app/components/notes/provider.ts b/app/components/notes/provider.ts
new file mode 100644
index 0000000..9aab5f0
--- /dev/null
+++ b/app/components/notes/provider.ts
@@ -0,0 +1,11 @@
+import type { Status } from "@versia/client/schemas";
+import type { InjectionKey } from "vue";
+import type { z } from "zod";
+
+type PartialBy
= Omit & Partial>;
+
+export const key = Symbol() as InjectionKey<{
+ note: PartialBy, "reblog" | "quote">;
+ isRemote: boolean;
+ rebloggerNote?: z.infer;
+}>;
diff --git a/app/components/notes/reactions/index.vue b/app/components/notes/reactions/index.vue
index 6702ff5..9561cd8 100644
--- a/app/components/notes/reactions/index.vue
+++ b/app/components/notes/reactions/index.vue
@@ -1,23 +1,18 @@
diff --git a/app/components/notes/reactions/reaction.vue b/app/components/notes/reactions/reaction.vue
index f86c812..e920651 100644
--- a/app/components/notes/reactions/reaction.vue
+++ b/app/components/notes/reactions/reaction.vue
@@ -61,14 +61,16 @@ import {
} from "~/components/ui/hover-card";
import * as m from "~~/paraglide/messages.js";
import { getLocale } from "~~/paraglide/runtime.js";
+import { key } from "../provider";
-const { reaction, emoji, statusId } = defineProps<{
- statusId: string;
+const { reaction, emoji } = defineProps<{
reaction: z.infer;
emoji?: z.infer;
}>();
const authStore = useAuthStore();
+// biome-ignore lint/style/noNonNullAssertion: We want an error if not provided
+const { note } = inject(key)!;
const formatNumber = (number: number) =>
new Intl.NumberFormat(getLocale(), {
@@ -80,7 +82,7 @@ const formatNumber = (number: number) =>
const accounts = ref[] | null>(null);
const refreshReactions = async () => {
- const { data } = await authStore.client.getStatusReactions(statusId);
+ const { data } = await authStore.client.getStatusReactions(note.id);
const accountIds =
data.find((r) => r.name === reaction.name)?.account_ids.slice(0, 10) ??
[];
@@ -95,7 +97,7 @@ const react = async () => {
const id = toast.loading(m.gray_stale_antelope_roam());
const { data } = await authStore.client.createEmojiReaction(
- statusId,
+ note.id,
reaction.name,
);
@@ -108,7 +110,7 @@ const unreact = async () => {
const id = toast.loading(m.many_weary_bat_intend());
const { data } = await authStore.client.deleteEmojiReaction(
- statusId,
+ note.id,
reaction.name,
);
diff --git a/app/components/notes/reblog-header.vue b/app/components/notes/reblog-header.vue
index e54fed8..e4d9121 100644
--- a/app/components/notes/reblog-header.vue
+++ b/app/components/notes/reblog-header.vue
@@ -4,9 +4,15 @@
class="flex-row px-2 py-1 items-center gap-2 hover:bg-muted duration-100 text-sm"
>
-
- {{ displayName }}
+ {{ rebloggerNote.account.display_name }}
{{ m.large_vivid_horse_catch() }}
@@ -14,19 +20,21 @@
diff --git a/app/components/timelines/timeline.vue b/app/components/timelines/timeline.vue
index fd50c5a..2e9b000 100644
--- a/app/components/timelines/timeline.vue
+++ b/app/components/timelines/timeline.vue
@@ -60,7 +60,7 @@ const props = defineProps<{
const emit = defineEmits<(e: "update") => void>();
-const loadMoreTrigger = ref(null);
+const loadMoreTrigger = useTemplateRef("loadMoreTrigger");
useIntersectionObserver(loadMoreTrigger, ([observer]) => {
if (observer?.isIntersecting && !props.isLoading && !props.hasReachedEnd) {