mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
10 lines
238 B
TypeScript
10 lines
238 B
TypeScript
|
|
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;
|
||
|
|
};
|