{"size": 1097, "ext": "js", "max_stars_repo_path": "pages/_app.js", "max_stars_repo_name": "ktjd123/ScreenShareViaHttp", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "pages/_app.js", "max_issues_repo_name": "ktjd123/ScreenShareViaHttp", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "pages/_app.js", "max_forks_repo_name": "ktjd123/ScreenShareViaHttp", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.387755102, "max_line_length": 55, "alphanum_fraction": 0.6043755697}
import React from 'react';
import App, { Container } from 'next/app';
import { Provider } from 'mobx-react';

import { ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.min.css';
import { css } from 'glamor';

// stores
import CounterStore from '../store/counter';

import { PageHead } from '../components';

import '../styles/default.scss';

const counter = new CounterStore();

export default class MyApp extends App {
  static async getInitialProps({ Component, ctx }) {
    let pageProps = {};

    if (Component.getInitialProps) {
      pageProps = await Component.getInitialProps(ctx);
    }

    return { pageProps };
  }

  render() {
    const { Component, pageProps } = this.props;

    return (
      <Container>
        <PageHead />
        <ToastContainer
          autoClose={3000}
          position="bottom-center"
          toastClassName={css({
            background: 'black',
          })}
        />
        <Provider counter={counter}>
          <Component {...this.state} {...pageProps} />
        </Provider>
      </Container>
    );
  }
}
