mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2025-12-23 18:29:19 -05:00
23 lines
492 B
TypeScript
23 lines
492 B
TypeScript
import Head from 'next/head';
|
|
import useSettings from '../../../hooks/useSettings';
|
|
|
|
interface PageTitleProps {
|
|
title: string | (string | undefined)[];
|
|
}
|
|
|
|
const PageTitle = ({ title }: PageTitleProps) => {
|
|
const settings = useSettings();
|
|
|
|
const titleText = `${
|
|
Array.isArray(title) ? title.filter(Boolean).join(' - ') : title
|
|
} - ${settings.currentSettings.applicationTitle}`;
|
|
|
|
return (
|
|
<Head>
|
|
<title>{titleText}</title>
|
|
</Head>
|
|
);
|
|
};
|
|
|
|
export default PageTitle;
|