NoLoginLayout.tsx 1.5 KB

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