Commit 1a14a1de authored by bianca-camargo-machado1's avatar bianca-camargo-machado1
Browse files

fix date

parent bb2af569
Showing with 1 addition and 4 deletions
+1 -4
......@@ -52,10 +52,7 @@ export default function TutorialComponent({ data }) {
React.useEffect(() => {
if (date) {
let dateParam = date.split(/[\s-:]/);
dateParam[1] = (parseInt(dateParam[1], 10) - 1).toString();
const formattedDate = moment(new Date(...dateParam)).format("DD/MM/YYYY");
const formattedDate = moment(new Date(date)).format("DD/MM/YYYY");
setAppoioDate(formattedDate);
}
}, [date]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment