Skip to content

Commit 8190e35

Browse files
committed
Add banned landing page
1 parent 5d2409c commit 8190e35

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

client/pages/banned.js

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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+
10+
const Wrapper = styled.div`
11+
display: flex;
12+
flex: 1 1 100%;
13+
flex-direction: column;
14+
align-items: cetner;
15+
`;
16+
17+
const Title = styled.h3`
18+
font-size: 24px;
19+
font-weight: normal;
20+
text-align: center;
21+
margin: 24px 0 0;
22+
23+
span {
24+
font-weight: bold;
25+
border-bottom: 1px dotted rgba(0, 0, 0, 0.4);
26+
}
27+
28+
@media only screen and (max-width: 448px) {
29+
font-size: 18px;
30+
}
31+
`;
32+
33+
const Subtitle = styled.h3`
34+
font-size: 16px;
35+
font-weight: normal;
36+
text-align: center;
37+
38+
@media only screen and (max-width: 448px) {
39+
font-size: 14px;
40+
}
41+
`;
42+
43+
class BannedPage extends Component {
44+
static getInitialProps({ req, store }) {
45+
const token = req && req.cookies && req.cookies.token;
46+
if (token && store) store.dispatch(authUser(token));
47+
return {};
48+
}
49+
50+
render() {
51+
return (
52+
<BodyWrapper>
53+
<Wrapper>
54+
<Title>
55+
Link has been banned and removed because of <span>malware or scam</span>.
56+
</Title>
57+
<Subtitle>
58+
If you noticed a malware/scam link shortened by Kutt,{' '}
59+
<Link href="/report" to="report">
60+
<a href="/report" title="Send report">
61+
send us a report
62+
</a>
63+
</Link>.
64+
</Subtitle>
65+
</Wrapper>
66+
<Footer />
67+
</BodyWrapper>
68+
);
69+
}
70+
}
71+
72+
export default withRedux(initialState)(BannedPage);

0 commit comments

Comments
 (0)