Skip to content

Commit 43e2ddb

Browse files
committed
change in architecture
1 parent 9c45b1a commit 43e2ddb

80 files changed

Lines changed: 3768 additions & 2232 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React, { Component } from "react";
2+
import { withRouter } from "next/router";
3+
4+
class UnderMaintenance extends Component {
5+
6+
render() {
7+
return (
8+
<section className="under-maintenance">
9+
<div className="wrapper">
10+
<div className="illustration">
11+
<img src="../../static/cleaning.png" />
12+
</div>
13+
<p className="text">Site Under Maintenance</p>
14+
<p>We'll come back soon.</p>
15+
</div>
16+
</section>
17+
);
18+
}
19+
}
20+
21+
export default withRouter(UnderMaintenance);

components/footer.js

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,18 @@ import { toast } from "react-toastify";
55
import "react-toastify/dist/ReactToastify.css";
66
import bitsbeatLogo from "../static/logo-white.png";
77
import logoImage from "../static/logo.svg";
8-
8+
// import {
9+
// TwitterTimelineEmbed,
10+
// TwitterShareButton,
11+
// TwitterFollowButton,
12+
// TwitterHashtagButton,
13+
// TwitterMentionButton,
14+
// TwitterTweetEmbed,
15+
// TwitterMomentShare,
16+
// TwitterDMButton,
17+
// TwitterVideoEmbed,
18+
// TwitterOnAirButton,
19+
// } from "react-twitter-embed";
920
class Footer extends React.Component {
1021
state = {
1122
name: "",
@@ -17,8 +28,8 @@ class Footer extends React.Component {
1728
responseMessage: null,
1829
responseStatus: null,
1930
loading: false,
20-
domain: 'Witti',
21-
anotherDomain:'Prysm'
31+
domain: "Witti",
32+
anotherDomain: "Altona",
2233
};
2334

2435
componentDidMount() {
@@ -32,10 +43,10 @@ class Footer extends React.Component {
3243
pauseOnHover: true,
3344
draggable: false,
3445
});
35-
if(window.location.href.includes('witti')) {
36-
this.setState({domain:'Witti', anotherDomain:'Prysm'})
37-
} else if(window.location.href.includes('prysm')) {
38-
this.setState({domain:'Prysm', anotherDomain: 'Witti'})
46+
if (window.location.href.includes("witti")) {
47+
this.setState({ domain: "Witti", anotherDomain: "Altona" });
48+
} else if (window.location.href.includes("altona")) {
49+
this.setState({ domain: "Altona", anotherDomain: "Witti" });
3950
}
4051
}
4152

@@ -91,16 +102,17 @@ class Footer extends React.Component {
91102
};
92103

93104
render() {
94-
const { domain, anotherDomain } = this.state;
105+
const { domain, anotherDomain } = this.state;
95106

96107
return (
97108
<footer className="main-footer ">
98109
<div className="container">
99-
<div className="row">
100-
<div className="col-md-8 text-center offset-md-2">
110+
<div className="row d-flex align-items-center">
111+
<div className="col-md-12 text-center">
101112
<img src={logoImage}></img>
102113
<p className="main-footer-text">
103-
ETH 2.0 Beacon Chain {domain} {domain && domain === 'Witti' && 'Multiclient'} Testnet Explorer{" "}
114+
ETH 2.0 Beacon Chain {domain}{" "}
115+
{domain && domain === "Witti" && "Multiclient"} Testnet Explorer{" "}
104116
</p>
105117

106118
<div>
@@ -145,9 +157,27 @@ class Footer extends React.Component {
145157
<i className="icon-twitter"></i>
146158
</a>
147159
</li>
160+
<li>
161+
<a
162+
href="https://t.me/joinchat/IhkTwRjHwsaOq3aj1iBTig"
163+
target="_blank"
164+
className="tele"
165+
title="Telegram"
166+
>
167+
<i className="icon-telegram"></i>
168+
</a>
169+
</li>
148170
</ul>
149171
</div>
150172
</div>
173+
{/* <div className="col-md-4">
174+
<TwitterTimelineEmbed
175+
sourceType="profile"
176+
screenName="blockaction_io"
177+
options={{ height: 200 }}
178+
/>
179+
<TwitterFollowButton screenName={"blockaction_io"} />
180+
</div> */}
151181
</div>
152182
<hr></hr>
153183
<div className="row pb-3">
@@ -159,7 +189,11 @@ class Footer extends React.Component {
159189
<div className="col-md-8 text-right">
160190
<small>
161191
BlockAction | Developed by{" "}
162-
<a href="https://www.bitsbeat.com/" target="_blank" className="bitsbeat-text">
192+
<a
193+
href="https://www.bitsbeat.com/"
194+
target="_blank"
195+
className="bitsbeat-text"
196+
>
163197
Bitsbeat IT Solutions
164198
</a>
165199
</small>

components/layout.js

Lines changed: 56 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
import React, { Component } from "react";
12
import Head from "next/head";
23
import NavigationBar from "./navbar";
4+
import UnderMaintenance from "./Common/UnderMaintenance";
35
import Footer from "./footer";
6+
import * as action from "utils/apiAdmin";
47

58
import {
69
websiteTitle,
@@ -9,80 +12,99 @@ import {
912
websiteImage,
1013
} from "utils/constants";
1114

12-
import * as action from "utils/api";
1315
import "bootstrap/dist/css/bootstrap.min.css";
1416
import "../styles/style.scss";
1517
import "../styles/fonts/style.css";
1618

17-
const Layout = (props) => {
19+
class Layout extends Component {
20+
21+
constructor(props){
22+
super(props);
23+
this.state = {
24+
orgData: []
25+
}
26+
}
27+
28+
componentDidMount() {
29+
action
30+
.getData("organisation-info/client")
31+
.then(
32+
res => {
33+
this.setState({orgData: res && res.data && res.data.dataList && res.data.dataList[0]})
34+
}
35+
);
36+
}
37+
38+
render(){
39+
const { orgData } = this.state;
1840
return (
1941
<>
2042
<Head>
21-
<title>{props.websiteTitle ? props.websiteTitle : websiteTitle}</title>
43+
<title>{this.props.websiteTitle ? this.props.websiteTitle : websiteTitle}</title>
2244
<meta
2345
name="author"
24-
content={props.articleAuthor ? props.articleAuthor : "ETH"}
46+
content={this.props.articleAuthor ? this.props.articleAuthor : "ETH"}
2547
/>
2648
<meta
2749
name="description"
2850
content={
29-
props.websiteDescription
30-
? props.websiteDescription
51+
this.props.websiteDescription
52+
? this.props.websiteDescription
3153
: websiteDescription
3254
}
3355
/>
3456
<meta
3557
name="keywords"
3658
content={
37-
props.websiteKeywords ? props.websiteKeywords : websiteKeywords
59+
this.props.websiteKeywords ? this.props.websiteKeywords : websiteKeywords
3860
}
3961
></meta>
4062
<meta
4163
name="image"
42-
content={props.websiteImage ? `${props.websiteImage}` : websiteImage}
64+
content={this.props.websiteImage ? `${this.props.websiteImage}` : websiteImage}
4365
/>
4466

4567
{/* OG:Type */}
4668
<meta property="og:type" content="article" />
4769
<meta
4870
property="og:title"
49-
content={props.websiteTitle ? props.websiteTitle : websiteTitle}
71+
content={this.props.websiteTitle ? this.props.websiteTitle : websiteTitle}
5072
/>
5173
<meta
5274
property="og:description"
5375
content={
54-
props.websiteDescription
55-
? props.websiteDescription
76+
this.props.websiteDescription
77+
? this.props.websiteDescription
5678
: websiteDescription
5779
}
5880
/>
5981
<meta
6082
property="og:image"
61-
content={props.websiteImage ? `${props.websiteImage}` : websiteImage}
83+
content={this.props.websiteImage ? `${this.props.websiteImage}` : websiteImage}
6284
/>
6385

6486
{/* Item Prop */}
6587
<meta
6688
itemProp="author"
67-
content={props.articleAuthor ? props.articleAuthor : "ETH"}
89+
content={this.props.articleAuthor ? this.props.articleAuthor : "ETH"}
6890
/>
6991
<meta
7092
itemProp="description"
7193
content={
72-
props.websiteDescription
73-
? props.websiteDescription
94+
this.props.websiteDescription
95+
? this.props.websiteDescription
7496
: websiteDescription
7597
}
7698
/>
7799
<meta
78100
itemProp="keywords"
79101
content={
80-
props.websiteKeywords ? props.websiteKeywords : websiteKeywords
102+
this.props.websiteKeywords ? this.props.websiteKeywords : websiteKeywords
81103
}
82104
></meta>
83105
<meta
84106
itemProp="image"
85-
content={props.websiteImage ? props.websiteImage : websiteImage}
107+
content={this.props.websiteImage ? this.props.websiteImage : websiteImage}
86108
/>
87109

88110
<meta
@@ -109,14 +131,26 @@ const Layout = (props) => {
109131
</script>
110132
{/* <script
111133
type='application/ld+json'
112-
dangerouslySetInnerHTML={{ __html: JSON.stringify(props.schemaData) }}
134+
dangerouslySetInnerHTML={{ __html: JSON.stringify(this.props.schemaData) }}
113135
/> */}
114136
</Head>
115-
{!props.metaDataFlag && <NavigationBar {...props} />}
116-
<div className="wrapper">{props.children}</div>
117-
{!props.metaDataFlag && <Footer {...props} />}
118-
</>
137+
{ orgData && orgData.active === false && <UnderMaintenance />}
138+
{orgData && orgData.active === true && !this.props.metaDataFlag && <NavigationBar {...this.props} />}
139+
{orgData && orgData.active === true &&
140+
<div className="wrapper">
141+
{this.props.children}
142+
</div>
143+
}
144+
{orgData && orgData.active === true && !this.props.metaDataFlag && <Footer {...this.props} /> }
145+
{/* { orgData && orgData.active === false && <UnderMaintenance />}
146+
{!this.props.metaDataFlag && <NavigationBar {...this.props} />}
147+
<div className="wrapper">
148+
{this.props.children}
149+
</div>
150+
{!this.props.metaDataFlag && <Footer {...this.props} /> } */}
151+
</>
119152
);
153+
}
120154
};
121155

122156
export default Layout;

components/navbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class NavigationBar extends React.Component {
9595
<Link href="/reward" passHref>
9696
<Nav.Link>Reward Calculator</Nav.Link>
9797
</Link>
98-
<Link href="/faqs" passHref>
98+
<Link href="/resources" passHref>
9999
<Nav.Link>Resources</Nav.Link>
100100
</Link>
101101
</Nav>

0 commit comments

Comments
 (0)