You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
512 B
23 lines
512 B
4 years ago
|
import React from 'react';
|
||
|
import useSettings from '../../../hooks/useSettings';
|
||
|
import Head from 'next/head';
|
||
|
|
||
|
interface PageTitleProps {
|
||
|
title: string | (string | undefined)[];
|
||
|
}
|
||
|
|
||
|
const PageTitle: React.FC<PageTitleProps> = ({ title }) => {
|
||
|
const settings = useSettings();
|
||
|
|
||
|
return (
|
||
|
<Head>
|
||
|
<title>
|
||
|
{Array.isArray(title) ? title.filter(Boolean).join(' - ') : title} -{' '}
|
||
|
{settings.currentSettings.applicationTitle}
|
||
|
</title>
|
||
|
</Head>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default PageTitle;
|