1
0
mirror of https://github.com/franjsco/tick3t synced 2025-06-05 22:19:18 +02:00

refactor: helper functions

This commit is contained in:
Francesco Esposito
2019-07-31 16:06:40 +02:00
parent 399a173e64
commit 9c075469e4

View File

@@ -3,13 +3,15 @@ import moment from 'moment';
export const formatDate = (dateString) => { export const formatDate = (dateString) => {
if (dateString) { if (dateString) {
const date = moment(dateString); if (dateString) {
return date.format('DD-MM-YYYY HH:mm'); const date = moment(dateString);
return date.format('DD-MM-YYYY HH:mm');
}
} }
return ''; return '';
} }
export const decode = (value) => { export const formatStatus = (value) => {
return value.replace(/_/g, " "); if (value) return value.replace(/_/g, " ");
} }