All files / apps/huella-legal/app/composables useSeoTitleTemplate.ts

100% Statements 3/3
75% Branches 3/4
100% Functions 2/2
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7  5x 3x 4x      
/** Keeps the site's title template off a title the CMS already signs with the site's name. */
export const useSeoTitleTemplate = (seoTitle: () => string | undefined) => {
    useHead({
        titleTemplate: (title) => (seoTitle() ? (title ?? null) : `${title} %separator %siteName`),
    });
};