PromucFlow_constructor/app/client/src/pages/common/ServerUnavailable.tsx

50 lines
1.2 KiB
TypeScript
Raw Normal View History

import React from "react";
import styled from "styled-components";
import Button from "components/editorComponents/Button";
import PageUnavailableImage from "assets/images/404-image.png";
import { APPLICATIONS_URL } from "constants/routes";
2020-10-28 10:59:34 +00:00
import history from "utils/history";
const Wrapper = styled.div`
text-align: center;
margin-top: 5%;
.bold-text {
font-weight: ${props => props.theme.fontWeights[3]};
font-size: 24px;
}
.page-unavailable-img {
width: 35%;
}
.button-position {
margin: auto;
}
`;
const ServerUnavailable = () => {
return (
<Wrapper>
<img
src={PageUnavailableImage}
alt="Page Unavailable"
className="page-unavailable-img"
/>
<div>
<p className="bold-text">Appsmith server is unavailable</p>
<p>Please try again after some time</p>
<Button
filled
text="Go back to homepage"
intent="primary"
icon="arrow-right"
iconAlignment="right"
size="small"
className="button-position"
2020-10-28 10:59:34 +00:00
onClick={() => history.push(APPLICATIONS_URL)}
/>
</div>
</Wrapper>
);
};
export default ServerUnavailable;