Skip to content

Commit

Permalink
chore :: stage 조회로 이동
Browse files Browse the repository at this point in the history
  • Loading branch information
dutexion committed Aug 5, 2024
1 parent 69b125e commit eceb3f1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/pages/Team/deploy/Container/History.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ContainerDetailType } from '@/utils/types/containerType';
import { HistoryType, StageType } from '@/utils/types/historyType';
import styled from '@emotion/styled';
import { useState, useEffect } from 'react';
import { useParams } from 'react-router-dom';
import { Link, useParams } from 'react-router-dom';
import LongArrowImg from '@/assets/LongArrow.svg';
import { UnknownIcon } from '@/assets/UnknownIcon';
import { PassedIcon } from '@/assets/PassedIcon';
Expand Down Expand Up @@ -44,6 +44,8 @@ export const TeamDeployContainerHistory = () => {
const [history, setHistory] = useState<HistoryType[]>([]);

useEffect(() => {
console.log(env);

if (deployUUID && env) {
getDetailContainer(deployUUID, env).then((res) => {
setData(res.data);
Expand Down Expand Up @@ -88,7 +90,9 @@ export const TeamDeployContainerHistory = () => {
<DeployBox>
{item.stages.map((stage, stageIndex) => (
<React.Fragment key={stageIndex}>
<Stage name={stage.name} status={stage.status} />
<Link to={`${item.pipeline_name}/${item.pipeline_counter}/${stage.name}`}>
<Stage name={stage.name} status={stage.status} />
</Link>
{stageIndex < item.stages.length - 1 && <img src={LongArrowImg} />}
</React.Fragment>
))}
Expand Down Expand Up @@ -176,6 +180,7 @@ const DeployBox = styled.div`
`;

const StageBox = styled.div`
cursor: pointer;
width: 150px;
height: 50px;
border-radius: 8px;
Expand Down

0 comments on commit eceb3f1

Please sign in to comment.