@kiwicom/smart-faq
Version:
21 lines (14 loc) • 377 B
JavaScript
// @flow
import * as React from 'react';
import Text from '@kiwicom/orbit-components/lib/Text';
import { formatDepartureDate } from '../../helpers/dateUtils';
type Props = {|
date: ?string,
|};
const FormattedDate = ({ date }: Props) => {
if (date) {
return <Text>{formatDepartureDate(date)}</Text>;
}
return <Text>--</Text>;
};
export default FormattedDate;