Open VadSiam opened 5 years ago
https://github.com/rogotsky/kmu-filters/blob/87cdc835753a2d8cd6520c66e3e8555c7e95ad81/src/components/Posts/Post.js#L9
please make all calculations before return (it makes the code easy to read): const dataString = (dd.length === 1 ? 0${dd} : dd) + divider + (mm.length === 1 ? 0${mm} : mm) + divider + yyyy; return dataString;
0${dd}
0${mm}
@VadSiam Fixed
https://github.com/rogotsky/kmu-filters/blob/87cdc835753a2d8cd6520c66e3e8555c7e95ad81/src/components/Posts/Post.js#L9
please make all calculations before return (it makes the code easy to read): const dataString = (dd.length === 1 ?
0${dd}
: dd) + divider + (mm.length === 1 ?0${mm}
: mm) + divider + yyyy; return dataString;