NoLoginLayout.tsx 1.6 KB

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