|
@@ -14,17 +14,13 @@ import github from "assets/github-white.png";
|
|
|
import { integrationList } from "shared/common";
|
|
import { integrationList } from "shared/common";
|
|
|
import { capitalize } from "shared/string_utils";
|
|
import { capitalize } from "shared/string_utils";
|
|
|
|
|
|
|
|
-const EnvironmentDetail = () => {
|
|
|
|
|
|
|
+const DeploymentDetail = () => {
|
|
|
const { params } = useRouteMatch<{ namespace: string }>();
|
|
const { params } = useRouteMatch<{ namespace: string }>();
|
|
|
const context = useContext(Context);
|
|
const context = useContext(Context);
|
|
|
const [prDeployment, setPRDeployment] = useState<PRDeployment>(null);
|
|
const [prDeployment, setPRDeployment] = useState<PRDeployment>(null);
|
|
|
- const [hasError, setHasError] = useState(false);
|
|
|
|
|
- const [isLoading, setIsLoading] = useState(false);
|
|
|
|
|
const [showRepoTooltip, setShowRepoTooltip] = useState(false);
|
|
const [showRepoTooltip, setShowRepoTooltip] = useState(false);
|
|
|
|
|
|
|
|
- const { currentProject, currentCluster, setCurrentError } = useContext(
|
|
|
|
|
- Context
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ const { currentProject, currentCluster } = useContext(Context);
|
|
|
|
|
|
|
|
const { search } = useLocation();
|
|
const { search } = useLocation();
|
|
|
let searchParams = new URLSearchParams(search);
|
|
let searchParams = new URLSearchParams(search);
|
|
@@ -55,14 +51,8 @@ const EnvironmentDetail = () => {
|
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
|
console.error(err);
|
|
console.error(err);
|
|
|
if (isSubscribed) {
|
|
if (isSubscribed) {
|
|
|
- setHasError(true);
|
|
|
|
|
setPRDeployment(null);
|
|
setPRDeployment(null);
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
- .finally(() => {
|
|
|
|
|
- if (isSubscribed) {
|
|
|
|
|
- setIsLoading(false);
|
|
|
|
|
- }
|
|
|
|
|
});
|
|
});
|
|
|
}, [params]);
|
|
}, [params]);
|
|
|
|
|
|
|
@@ -137,7 +127,7 @@ const EnvironmentDetail = () => {
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-export default EnvironmentDetail;
|
|
|
|
|
|
|
+export default DeploymentDetail;
|
|
|
|
|
|
|
|
const Flex = styled.div`
|
|
const Flex = styled.div`
|
|
|
display: flex;
|
|
display: flex;
|