All files / app/common/error ErrorCode.tsx

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2580x   80x   80x             80x 25x                     80x  
import React, { memo, FunctionComponent, ReactNode } from 'react';
 
import { TranslatedString } from '../../locale';
 
import './ErrorCode.scss';
 
export interface ErrorCodeProps {
    code: string;
    label?: ReactNode;
}
 
const ErrorCode: FunctionComponent<ErrorCodeProps> = ({ code, label }) => {
    return (
        <div className="errorCode">
            <span className="errorCode-label">
                { label ?? <TranslatedString id="common.error_code" /> }
            </span>
            { ' ' }
            <span className="errorCode-value">{ code }</span>
        </div>
    );
};
 
export default memo(ErrorCode);