maintenance mode update

This commit is contained in:
merelendor 2022-09-08 15:19:10 +03:00
parent 91f43b56f1
commit 0273b31653
3 changed files with 58 additions and 0 deletions

View File

@ -30,6 +30,7 @@ module.exports = withImages(withFonts(withLess({
async redirects()
{
return [
process.env.MAINTENANCE_MODE === "1" ? { source: "/((?!maintenance).*)", destination: "/maintenance", permanent: false } : { source: "/maintenance", destination: "/login", permanent: false },
{
source: '/support',
destination: '/support/faq',

View File

@ -18,6 +18,7 @@ export default async function handler(req, res)
{
if(jwt.verify(cookies.jwt, process.env.JWT_SECRET_CLIENT))
{
console.log("req.query.urlreq.query.urlreq.query.urlreq.query.urlreq.query.url", req.query.url);
try
{
axios.get(req.query.url, {

56
pages/maintenance.js Normal file
View File

@ -0,0 +1,56 @@
import React from "react";
import Head from "next/head";
import MainHeader from "./components/MainHeader";
import Footer from "./components/Footer";
class Page503 extends React.Component
{
constructor(props)
{
super(props);
this.state = {};
}
static getDerivedStateFromProps(nextProps, prevState)
{
return {};
}
componentDidMount() {}
render()
{
return (
<React.Fragment>
<Head>
<title>ЛК Эволюция автолизинга</title>
<meta name="description" content="ЛК Эволюция автолизинга" />
</Head>
<MainHeader/>
<main>
<section>
<div className="clear"></div>
<div className="container">
<div className="title_wrapper">
<div className="left">
<h1 className="section_title">Личный кабинет</h1>
</div>
</div>
<div className="offline">
<p>
В настоящий момент ведутся технические работы. Если Вам
необходимо получить информацию, пожалуйста, свяжитесь с нами
по телефону: 8 800 333 75 75
</p>
</div>
</div>
</section>
</main>
<Footer/>
</React.Fragment>
);
}
}
export default Page503;