banned.js 1.6 KB

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