From bd48e3fb06833009ef4a69228cd41b853af8202d Mon Sep 17 00:00:00 2001 From: YasinShaikh123 <123150391+YasinShaikh123@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:22:51 +0530 Subject: [PATCH] date update --- src/Pages/AccountDeletion/DeletionRequest.jsx | 8 ++++++++ src/Pages/Admin/Notification.jsx | 7 +++++++ src/Pages/Master/ExchangeRate/ExchangeRate.jsx | 7 +++++++ 3 files changed, 22 insertions(+) diff --git a/src/Pages/AccountDeletion/DeletionRequest.jsx b/src/Pages/AccountDeletion/DeletionRequest.jsx index e74a2fd..c4f0f2e 100644 --- a/src/Pages/AccountDeletion/DeletionRequest.jsx +++ b/src/Pages/AccountDeletion/DeletionRequest.jsx @@ -33,6 +33,14 @@ const DeletionRequest = () => { const [mouseEntered, setMouseEntered] = useState(false); const [mouseEnteredId, setMouseEnteredId] = useState(""); + const formatDate = (date) => { + return new Date(date).toLocaleDateString("en-GB", { + day: "2-digit", + month: "2-digit", + year: "numeric", + }); + }; + const { data, isLoading: DeletionLoading diff --git a/src/Pages/Admin/Notification.jsx b/src/Pages/Admin/Notification.jsx index 403545a..098e618 100644 --- a/src/Pages/Admin/Notification.jsx +++ b/src/Pages/Admin/Notification.jsx @@ -78,6 +78,13 @@ const Notification = () => { const [pageSize, setPageSize] = useState(TABLE_PAGINATION?.size); const [currentPage, setCurrentPage] = useState(TABLE_PAGINATION?.page); + const formatDate = (date) => { + return new Date(date).toLocaleDateString("en-GB", { + day: "2-digit", + month: "2-digit", + year: "numeric", + }); + }; // const { // data: investorDetails, diff --git a/src/Pages/Master/ExchangeRate/ExchangeRate.jsx b/src/Pages/Master/ExchangeRate/ExchangeRate.jsx index 5eba4eb..582b790 100644 --- a/src/Pages/Master/ExchangeRate/ExchangeRate.jsx +++ b/src/Pages/Master/ExchangeRate/ExchangeRate.jsx @@ -64,6 +64,13 @@ const ExchangeRate = () => { console.log(data?.data); + const formatDate = (date) => { + return new Date(date).toLocaleDateString("en-GB", { + day: "2-digit", + month: "2-digit", + year: "numeric", + }); + }; const filteredData = data?.data?.filter((item) => { const name = item?.fromCurrency?.currencyCode;