RawLayout.tsx 630 B

123456789101112131415161718192021222324252627282930
  1. import React, { ReactNode } from 'react';
  2. import Head from 'next/head';
  3. type Props = {
  4. title: string,
  5. className?: string,
  6. children?: ReactNode,
  7. }
  8. export const RawLayout = ({ children, title, className }: Props): JSX.Element => {
  9. const classNames: string[] = ['wrapper'];
  10. if (className != null) {
  11. classNames.push(className);
  12. }
  13. return (
  14. <>
  15. <Head>
  16. <title>{title}</title>
  17. <meta charSet="utf-8" />
  18. <meta name="viewport" content="initial-scale=1.0, width=device-width" />
  19. </Head>
  20. <div className={classNames.join(' ')}>
  21. {children}
  22. </div>
  23. </>
  24. );
  25. };