Skip to content

Commit

Permalink
replace replica.created with replica.startTIme
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Dec 2, 2024
1 parent 005e16d commit a837316
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/replica/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface ReplicaElements {
state?: React.JSX.Element;
}

type DurationProps = { started: Date; ended?: Date };
type DurationProps = { started: number | string | Date; ended?: Date };
const ReplicaDuration = ({ started, ended }: DurationProps) => {
const [now, setNow] = useState(new Date());
useInterval(() => setNow(new Date()), 1000);
Expand Down Expand Up @@ -131,10 +131,10 @@ const Overview = ({
</div>
<div className="grid grid--gap-medium">
{duration ||
(replica.created ? (
(replica.startTime ? (
<>
<ReplicaDuration
started={new Date(replica.created)}
started={replica.startTime}
ended={
replica.endTime ? new Date(replica.endTime) : undefined
}
Expand Down

0 comments on commit a837316

Please sign in to comment.