1import React from 'react';
2import { useFormState } from 'react-final-form';
3import { ErrorText } from 'indigo-react';
5import { WARNING } from './helpers';
7export default function FormError(props) {
11 error: validationError,
18 dirtySinceLastSubmit: true,
22 const showValidationError = !!validationError;
24 const showSubmitError = !!submitError && !dirtySinceLastSubmit;
26 const warning = submitErrors && submitErrors[WARNING];
27 const showWarning = !!warning && !dirtySinceLastSubmit;
29 return showSubmitError || showValidationError || showWarning ? (
30 <ErrorText {...props}>
31 {submitError || validationError || warning}
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list