mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
25 lines
541 B
TypeScript
25 lines
541 B
TypeScript
import type { LysandClient } from "@lysand-org/client";
|
|
|
|
type ExtendedDescription = {
|
|
updated_at: string;
|
|
content: string;
|
|
};
|
|
|
|
export const useExtendedDescription = (
|
|
client: MaybeRef<LysandClient | null>,
|
|
) => {
|
|
if (!ref(client).value) {
|
|
return ref(null as ExtendedDescription | null);
|
|
}
|
|
|
|
const output = ref(null as ExtendedDescription | null);
|
|
|
|
ref(client)
|
|
.value?.getInstanceExtendedDescription()
|
|
.then((res) => {
|
|
output.value = res.data;
|
|
});
|
|
|
|
return output;
|
|
};
|