Skip to content

Commit

Permalink
ADM-927:[frontend]fix: fix pipeline error message color
Browse files Browse the repository at this point in the history
  • Loading branch information
PengxiWPix committed Apr 28, 2024
1 parent b3e8d50 commit f37b455
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ import {
StyledContainer,
StyledImageContainer,
StyledImage,
StyledCommonTitle,
StyledCommonMessage,
StyledRetryMessage,
StyledRetryButton,
} from '@src/components/Metrics/MetricsStep/DeploymentFrequencySettings/PresentationForErrorCases/style';
import { StyledErrorMessage, StyledErrorSection, StyledErrorTitle } from '@src/components/Common/EmptyContent/styles';
import { PIPELINE_TOOL_RETRY_MESSAGE, PIPELINE_TOOL_RETRY_TRIGGER_MESSAGE } from '@src/constants/resources';
import { IGetPipelineToolInfoResult } from '@src/clients/pipeline/PipelineToolClient';
import { AXIOS_REQUEST_ERROR_CODE } from '@src/constants/resources';
import errorSvg from '@src/assets/PipelineInfoError.svg';
import React, { useCallback } from 'react';
import { Box } from '@mui/material';

export interface IPresentationForErrorCasesProps extends IGetPipelineToolInfoResult {
retry: () => void;
Expand All @@ -35,10 +33,10 @@ const PresentationForErrorCases = (props: IPresentationForErrorCasesProps) => {
</StyledRetryButton>
</StyledRetryMessage>
) : (
<Box>
<StyledCommonTitle>{props.errorTitle}</StyledCommonTitle>
<StyledCommonMessage>{props.errorMessage}</StyledCommonMessage>
</Box>
<StyledErrorSection>
<StyledErrorTitle>{props.errorTitle}</StyledErrorTitle>
<StyledErrorMessage>{props.errorMessage}</StyledErrorMessage>
</StyledErrorSection>
)}
</StyledContainer>
);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/useGetBoardInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const useGetBoardInfoEffect = (): useGetBoardInfoInterface => {
return res;
})
.catch((err) => {
if (err instanceof 'object') {
if (typeof err === 'object') {
const { code } = err;
errorCount++;
localBoardInfoFailedStatus = boardInfoPartialFailedStatusMapping(code);
Expand Down

0 comments on commit f37b455

Please sign in to comment.