{"size": 1182, "ext": "js", "max_stars_repo_path": "web/components/WriteMailToMe/index.js", "max_stars_repo_name": "connect-foundation/2019-06", "max_stars_repo_stars_event_min_datetime": "2019-11-04T04:35:11.000Z", "max_stars_repo_stars_event_max_datetime": "2020-10-30T04:54:03.000Z", "max_issues_repo_path": "web/components/WriteMailToMe/index.js", "max_issues_repo_name": "connect-foundation/2019-06", "max_issues_repo_issues_event_min_datetime": "2019-11-06T06:24:04.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-25T19:58:59.000Z", "max_forks_repo_path": "web/components/WriteMailToMe/index.js", "max_forks_repo_name": "connect-foundation/2019-06", "max_forks_repo_forks_event_min_datetime": "2019-11-08T09:33:07.000Z", "max_forks_repo_forks_event_max_datetime": "2020-08-24T04:40:05.000Z"}
{"max_stars_count": 27, "max_issues_count": 187, "max_forks_count": 9, "avg_line_length": 32.8333333333, "max_line_length": 76, "alphanum_fraction": 0.6844331641}
import React, { useState } from 'react';
import dynamic from 'next/dynamic';
import * as S from '../WriteMail/styled';
import InputReceiver from '../WriteMail/InputReceiver';
import InputSubject from '../WriteMail/InputSubject';
import Tools from '../WriteMail/Tools';
import { WriteMailContextProvider } from '../WriteMail/ContextProvider';
import DropZone from '../WriteMail/DropZone';
import sessionStorage from '../../utils/storage';
import HeadTitle from '../HeadTitle';

const InputBody = dynamic(import('../WriteMail/InputBody'), { ssr: false });

const WriteMailToMe = () => {
  const [dropZoneVisible, setDropZoneVisible] = useState(false);

  return (
    <WriteMailContextProvider>
      <HeadTitle title="내게쓰기" />
      <S.WriteArea>
        <Tools
          writeToMe={!!sessionStorage.getUser().email}
          dropZoneVisible={dropZoneVisible}
          setDropZoneVisible={setDropZoneVisible}
        />
        <InputReceiver defaultReceiver={sessionStorage.getUser().email} />
        <InputSubject />
        <DropZone visible={dropZoneVisible} />
        <InputBody />
      </S.WriteArea>
    </WriteMailContextProvider>
  );
};

export default WriteMailToMe;
