NoLoginLayout.tsx 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import React, { ReactNode } from 'react';
  2. import { useAppTitle } from '~/stores/context';
  3. import GrowiLogo from '../Icons/GrowiLogo';
  4. import { RawLayout } from './RawLayout';
  5. import commonStyles from './NoLoginLayout.module.scss';
  6. type Props = {
  7. className?: string,
  8. children?: ReactNode,
  9. }
  10. export const NoLoginLayout = ({
  11. children, className,
  12. }: Props): JSX.Element => {
  13. const { data: appTitle } = useAppTitle();
  14. const classNames: string[] = [''];
  15. if (className != null) {
  16. classNames.push(className);
  17. }
  18. return (
  19. <RawLayout className={`nologin ${commonStyles.nologin} ${classNames}`}>
  20. <div className="page-wrapper flex-row">
  21. <div className="main container-fluid">
  22. <div className="row">
  23. <div className="col-md-12 position-relative">
  24. <div className="nologin-header mx-auto flex-column">
  25. <GrowiLogo />
  26. <h1 className="my-3">{ appTitle ?? 'GROWI' }</h1>
  27. <div className="noLogin-form-errors px-3"></div>
  28. </div>
  29. {children}
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. </RawLayout>
  35. );
  36. };