mirror of
https://github.com/franjsco/tick3t
synced 2024-12-27 09:53:37 +01:00
refactor: helper functions
This commit is contained in:
parent
399a173e64
commit
9c075469e4
@ -3,13 +3,15 @@ import moment from 'moment';
|
||||
export const formatDate = (dateString) => {
|
||||
|
||||
if (dateString) {
|
||||
const date = moment(dateString);
|
||||
return date.format('DD-MM-YYYY HH:mm');
|
||||
if (dateString) {
|
||||
const date = moment(dateString);
|
||||
return date.format('DD-MM-YYYY HH:mm');
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
export const decode = (value) => {
|
||||
return value.replace(/_/g, " ");
|
||||
export const formatStatus = (value) => {
|
||||
if (value) return value.replace(/_/g, " ");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user