Skip to content

Commit

Permalink
converted date in server table to local time
Browse files Browse the repository at this point in the history
  • Loading branch information
bekossy committed Apr 25, 2024
1 parent 5f668da commit 3bd35c0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion agenta-web/src/components/ServerTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,14 @@ const ServerTable = <T extends AnyObject>(
props
.fetchData?.(tableParams)
.then((res) => {
setData(res.data)
const updatedResponse = {
...res,
data: res.data.map((item) => ({
...item,
created_at: new Date(item.created_at).toISOString(),
})),
}
setData(updatedResponse.data)
total.current = res.total || 0
})
.catch(console.error)
Expand Down

0 comments on commit 3bd35c0

Please sign in to comment.