banned.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import React, { Component } from 'react';
  2. import Link from 'next/link';
  3. import styled from 'styled-components';
  4. import withRedux from 'next-redux-wrapper';
  5. import initialState from '../store';
  6. import BodyWrapper from '../components/BodyWrapper';
  7. import Footer from '../components/Footer';
  8. import { authUser } from '../actions';
  9. const Wrapper = styled.div`
  10. display: flex;
  11. flex: 1 1 100%;
  12. flex-direction: column;
  13. align-items: cetner;
  14. `;
  15. const Title = styled.h3`
  16. font-size: 24px;
  17. font-weight: normal;
  18. text-align: center;
  19. margin: 24px 0 0;
  20. span {
  21. font-weight: bold;
  22. border-bottom: 1px dotted rgba(0, 0, 0, 0.4);
  23. }
  24. @media only screen and (max-width: 448px) {
  25. font-size: 18px;
  26. }
  27. `;
  28. const Subtitle = styled.h3`
  29. font-size: 16px;
  30. font-weight: normal;
  31. text-align: center;
  32. @media only screen and (max-width: 448px) {
  33. font-size: 14px;
  34. }
  35. `;
  36. class BannedPage extends Component {
  37. static getInitialProps({ req, store }) {
  38. const token = req && req.cookies && req.cookies.token;
  39. if (token && store) store.dispatch(authUser(token));
  40. return {};
  41. }
  42. render() {
  43. return (
  44. <BodyWrapper>
  45. <Wrapper>
  46. <Title>
  47. Link has been banned and removed because of <span>malware or scam</span>.
  48. </Title>
  49. <Subtitle>
  50. If you noticed a malware/scam link shortened by Kutt,{' '}
  51. <Link href="/report" to="report">
  52. <a href="/report" title="Send report">
  53. send us a report
  54. </a>
  55. </Link>.
  56. </Subtitle>
  57. </Wrapper>
  58. <Footer />
  59. </BodyWrapper>
  60. );
  61. }
  62. }
  63. export default withRedux(initialState)(BannedPage);