import React from "react"; import Head from 'next/head'; import Image from 'next/image'; import { connect } from "react-redux"; import { withRouter } from 'next/router'; import { reduxWrapper } from '../store'; import pluralize from 'pluralize-ru'; import { SpinnerCircular } from 'spinners-react'; import Header from './components/Header'; import Footer from './components/Footer'; import MainHeader from "./components/MainHeader"; import FormRequest from "./components/FormRequest"; import { logout } from '../actions'; class LogoutPage extends React.Component { constructor(props) { super(props); this.state = { }; } static getDerivedStateFromProps(nextProps, prevState) { return { }; } componentDidMount() { logout({ dispatch: this.props.dispatch, }) .then(() => { this.props.router.push("/"); }) .catch(() => { this.props.router.push("/"); }); } render() { return ( ЛК Эволюция автолизинга
); } } function mapStateToProps(state, ownProps) { return { } } export const getServerSideProps = reduxWrapper.getServerSideProps(store => async ({ req, res, query }) => { return { props: { } } } ); export default withRouter(connect(mapStateToProps)(LogoutPage));