import Head from "next/head";
import PropTypes from "prop-types";

type SEOProps = {
  pageTitle: string;
  description?: string;
}

const SEO = ({ pageTitle, description }: SEOProps) => {
    const title = `${pageTitle} | Super Fit - Better online personal training`;
    return (
        <Head>
            <title>{title}</title>
            <meta httpEquiv="x-ua-compatible" content="ie=edge" />
            <meta name="description" content={description || 'Unlock your fitness potential with Brisbanes top online personal trainer! Subscribe for tailored workout plans, nutrition advice, and 24/7 support. Start today!'} />
            <meta name="robots" content="noindex, follow" />
            <meta
                name="viewport"
                content="width=device-width, initial-scale=1, shrink-to-fit=no"
            />
            <link rel="icon" href="/logo.png" />
        </Head>
    );
};

SEO.propTypes = {
    pageTitle: PropTypes.string.isRequired,
};

export default SEO;
