From 6735e634f19a776c3f6a1a5c5206b19f7fd663ce Mon Sep 17 00:00:00 2001 From: Square Date: Thu, 20 Jun 2024 19:25:48 +0530 Subject: [PATCH] Added GoBackBtn in History.jsx --- src/components/History.jsx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/components/History.jsx b/src/components/History.jsx index ba789a2..c70dde3 100644 --- a/src/components/History.jsx +++ b/src/components/History.jsx @@ -1,5 +1,6 @@ import React, { useContext } from 'react'; import { HistoryContext } from '../historyContext/HistoryContext.jsx'; +import GoBackButton from './GoBackButton.jsx'; export default function History() { @@ -17,7 +18,7 @@ export default function History() { const year = date.getFullYear().toString(); return `${day}-${month}-${year}`; - } + }; // This function deletes the history using its id. const handleRemoveHistoryBtnClick = (id) => { @@ -26,29 +27,33 @@ export default function History() { }; return ( + <> +
{ userHistory.length > 0 ? userHistory.map((history) =>

{formatDate(history['id'])}{history['name']}

) : }
+ ); }; \ No newline at end of file