report.js 934 B

1234567891011121314151617181920212223242526272829303132333435
  1. import React from 'react';
  2. import withRedux from 'next-redux-wrapper';
  3. import styled from 'styled-components';
  4. import initialState from '../store';
  5. import BodyWrapper from '../components/BodyWrapper';
  6. import { authUser } from '../actions';
  7. import { REPORT_EMAIL } from '../config';
  8. const Wrapper = styled.div`
  9. width: 600px;
  10. max-width: 97%;
  11. display: flex;
  12. flex-direction: column;
  13. align-items: flex-start;
  14. `;
  15. const ReportPage = () => (
  16. <BodyWrapper>
  17. <Wrapper>
  18. <h3>Report abuse</h3>
  19. <p>
  20. Report abuses, malware and phishing links to the below email address. We will take them down
  21. within 12 hours.
  22. </p>
  23. <p>{REPORT_EMAIL}</p>
  24. </Wrapper>
  25. </BodyWrapper>
  26. );
  27. ReportPage.getInitialProps = ({ req, store }) => {
  28. const token = req && req.cookies && req.cookies.token;
  29. if (token && store) store.dispatch(authUser(token));
  30. };
  31. export default withRedux(initialState)(ReportPage);