initial commit

This commit is contained in:
victorAnumudu
2024-05-03 04:49:59 +01:00
parent 7bc39a449c
commit 4e97119644
10 changed files with 65 additions and 32 deletions
+2 -1
View File
@@ -1,6 +1,6 @@
import {Dispatch, SetStateAction} from 'react'
export type ID = undefined | null | number
export type ID = undefined | null | number | string
export type PaginationState = {
page: number
@@ -23,6 +23,7 @@ export type SearchState = {
export type Response<T> = {
data?: T
records?: Array<any>
payload?: {
message?: string
errors?: {
+18
View File
@@ -0,0 +1,18 @@
export function NewDateTimeFormatter(isoDateString:any, addHour = true) {
const date = new Date(isoDateString);
if (addHour) {
date.setTime(date.getTime() + 1 * 60 * 60 * 1000);
}
const formattedDate = date.toLocaleDateString("en-US", {
year: "numeric",
month: "numeric",
day: "numeric",
hour: "2-digit",
minute: "2-digit",
// second: "2-digit",
hour12: true,
timeZone: "UTC",
});
return formattedDate;
}