ソースを参照

Hotfix preview env tab (#2943)

* package

* hotfix prev env tab

---------

Co-authored-by: Justin Rhee <jusrhee@Justins-MacBook-Air.local>
jusrhee 3 年 前
コミット
500ee2bad7

+ 10 - 6
dashboard/src/main/home/cluster-dashboard/preview-environments/components/PreviewEnvironmentsHeader.tsx

@@ -4,6 +4,7 @@ import DashboardHeader from "../../DashboardHeader";
 import PullRequestIcon from "assets/pull_request_icon.svg";
 import api from "shared/api";
 import Banner from "components/Banner";
+import Spacer from "components/porter/Spacer";
 
 export const PreviewEnvironmentsHeader = () => {
   const [githubStatus, setGithubStatus] = useState<string>(
@@ -31,12 +32,15 @@ export const PreviewEnvironmentsHeader = () => {
         capitalize={false}
       />
       {githubStatus != "no active incidents" ? (
-        <Banner type="error">
-          GitHub has an ongoing incident.
-          <StyledLink href={`${githubStatus}`} target="_blank">
-            View details
-          </StyledLink>
-        </Banner>
+        <>
+          <Banner type="error">
+            GitHub has an ongoing incident.
+            <StyledLink href={`${githubStatus}`} target="_blank">
+              View details
+            </StyledLink>
+          </Banner>
+          <Spacer y={1} />
+        </>
       ) : null}
     </>
   );

+ 1 - 1
dashboard/src/main/home/sidebar/ClusterSection.tsx

@@ -106,7 +106,7 @@ export const ClusterSection: React.FC<Props> = ({
               Stacks
             </NavButton>
           ) : null}
-          {currentCluster?.preview_envs_enabled && (
+          {cluster?.preview_envs_enabled && (
             <NavButton
               path="/preview-environments"
               targetClusterName={cluster?.name}