|
@@ -3,6 +3,7 @@ import styled from "styled-components";
|
|
|
import DashboardHeader from "../../DashboardHeader";
|
|
import DashboardHeader from "../../DashboardHeader";
|
|
|
import PullRequestIcon from "assets/pull_request_icon.svg";
|
|
import PullRequestIcon from "assets/pull_request_icon.svg";
|
|
|
import api from "shared/api";
|
|
import api from "shared/api";
|
|
|
|
|
+import Banner from "components/Banner";
|
|
|
|
|
|
|
|
export const PreviewEnvironmentsHeader = () => {
|
|
export const PreviewEnvironmentsHeader = () => {
|
|
|
const [githubStatus, setGithubStatus] = useState<string>(
|
|
const [githubStatus, setGithubStatus] = useState<string>(
|
|
@@ -30,23 +31,22 @@ export const PreviewEnvironmentsHeader = () => {
|
|
|
capitalize={false}
|
|
capitalize={false}
|
|
|
/>
|
|
/>
|
|
|
{githubStatus != "no active incidents" ? (
|
|
{githubStatus != "no active incidents" ? (
|
|
|
- <AlertCard>
|
|
|
|
|
- <AlertCardIcon className="material-icons">error</AlertCardIcon>
|
|
|
|
|
- <AlertCardContent className="content">
|
|
|
|
|
- <AlertCardTitle className="title">
|
|
|
|
|
- Github has an ongoing incident
|
|
|
|
|
- </AlertCardTitle>
|
|
|
|
|
- Active incident:{" "}
|
|
|
|
|
- <a href={`${githubStatus}`} target="_blank">
|
|
|
|
|
- {githubStatus}
|
|
|
|
|
- </a>
|
|
|
|
|
- </AlertCardContent>
|
|
|
|
|
- </AlertCard>
|
|
|
|
|
|
|
+ <Banner type="error">
|
|
|
|
|
+ GitHub has an ongoing incident.
|
|
|
|
|
+ <StyledLink href={`${githubStatus}`} target="_blank">
|
|
|
|
|
+ View details
|
|
|
|
|
+ </StyledLink>
|
|
|
|
|
+ </Banner>
|
|
|
) : null}
|
|
) : null}
|
|
|
</>
|
|
</>
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+const StyledLink = styled.a`
|
|
|
|
|
+ text-decoration: underline;
|
|
|
|
|
+ margin-left: 7px;
|
|
|
|
|
+`;
|
|
|
|
|
+
|
|
|
const AlertCard = styled.div`
|
|
const AlertCard = styled.div`
|
|
|
transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|