Files
djledda-web/app/meta.ts
Daniel Ledda bcb820f35e nice
2024-10-31 23:46:23 +01:00

14 lines
320 B
TypeScript

import { useSSRContext, toValue, type MaybeRefOrGetter } from 'vue';
export default function useHead(params: {
title: MaybeRefOrGetter<string>,
}) {
const context = useSSRContext();
if (context) {
context.meta ??= {
title: toValue(params.title),
meta: {},
};
}
}