NoLoginLayout.tsx 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import Image from 'next/image';
  2. import type { JSX, ReactNode } from 'react';
  3. import { useAppTitle } from '~/states/global';
  4. import GrowiLogo from '../Common/GrowiLogo';
  5. import commonStyles from './NoLoginLayout.module.scss';
  6. import { RawLayout } from './RawLayout';
  7. type Props = {
  8. className?: string;
  9. children?: ReactNode;
  10. };
  11. export const NoLoginLayout = ({ children, className }: Props): JSX.Element => {
  12. const { data: appTitle } = useAppTitle();
  13. const classNames: string[] = [''];
  14. if (className != null) {
  15. classNames.push(className);
  16. }
  17. return (
  18. <RawLayout className={`nologin ${commonStyles.nologin} ${classNames}`}>
  19. <div className="d-flex align-items-center vh-100 mt-0 flex-row">
  20. <div className="main container-fluid">
  21. <div className="row">
  22. <div className="col-md-12 position-relative">
  23. <div className="nologin-header mx-auto rounded-4 rounded-bottom-0">
  24. <div className="d-flex justify-content-center align-items-center">
  25. <GrowiLogo />
  26. <Image
  27. width={128.48}
  28. height={28}
  29. src="/images/growi-brand-logo-login.svg"
  30. alt="GROWI"
  31. className="growi-logo-type my-3"
  32. />
  33. </div>
  34. {appTitle !== 'GROWI' ? (
  35. <h2 className="fs-4 text-center text-white">{appTitle}</h2>
  36. ) : null}
  37. <div className="noLogin-form-errors px-3"></div>
  38. </div>
  39. {children}
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. </RawLayout>
  45. );
  46. };