mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 04:10:32 +00:00
22 lines
303 B
JavaScript
22 lines
303 B
JavaScript
import React from 'react';
|
|
import {get} from 'lodash';
|
|
|
|
const hasErrorMessage = ({
|
|
|
|
}) => {
|
|
|
|
}
|
|
|
|
export default function ErrorMessage({
|
|
touched,
|
|
errors,
|
|
name,
|
|
children,
|
|
}) {
|
|
const error = get(errors, name);
|
|
const touch = get(touched, name);
|
|
|
|
return (error && touch) ? error : null;
|
|
}
|
|
|