frontend/composables/Note.ts

10 lines
238 B
TypeScript
Raw Normal View History

import type { Mastodon } from "megalodon";
export const useNote = async (client: Mastodon | null, noteId: string) => {
if (process.server || !client) {
return null;
}
return (await client.getStatus(noteId)).data;
};