fix(ui): timestamp in fetch details
This commit is contained in:
parent
7d9bd30939
commit
38bed444ca
2 changed files with 2 additions and 11 deletions
|
|
@ -57,7 +57,7 @@ function FetchDetailsModal(props: Props) {
|
|||
return (
|
||||
<div className="bg-white p-5 h-screen overflow-y-auto" style={{ width: '500px' }}>
|
||||
<h5 className="mb-4 text-2xl ">Network Request</h5>
|
||||
<FetchBasicDetails resource={resource} timestamp={props.time ? DateTime.fromMillis(props.time).setZone(timezone.value).toFormat(`hh:mm:ss a`) : undefined} />
|
||||
<FetchBasicDetails resource={resource} timestamp={resource.timestamp ? DateTime.fromMillis(resource.timestamp).setZone(timezone.value).toFormat(`LLL dd, yyyy, hh:mm:ss a`) : undefined} />
|
||||
|
||||
{isXHR && <FetchTabs isSpot={isSpot} resource={resource} />}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import React, { useMemo } from 'react';
|
||||
import React from 'react';
|
||||
import { formatBytes } from 'App/utils';
|
||||
import CopyText from 'Shared/CopyText';
|
||||
import { Tag } from 'antd';
|
||||
import cn from 'classnames';
|
||||
|
||||
|
|
@ -11,13 +10,6 @@ interface Props {
|
|||
|
||||
function FetchBasicDetails({ resource, timestamp }: Props) {
|
||||
const _duration = parseInt(resource.duration);
|
||||
const text = useMemo(() => {
|
||||
if (resource.url.length > 50) {
|
||||
const endText = resource.url.split('/').pop();
|
||||
return resource.url.substring(0, 50 - endText.length) + '.../' + endText;
|
||||
}
|
||||
return resource.url;
|
||||
}, [resource]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
|
@ -91,7 +83,6 @@ function FetchBasicDetails({ resource, timestamp }: Props) {
|
|||
{timestamp}
|
||||
</Tag>
|
||||
</div>
|
||||
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue