Skip to content

Commit

Permalink
Update index.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
ansm authored Aug 6, 2024
1 parent e830cb4 commit 55c1f11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/services/components/service/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ServiceItem: FunctionComponent<ServiceItemProps> = ({ item }) => {

const calculateUpTime = () => {
let successCount = item.logs.filter((item)=> item.status === Status.OPERATIONAL).length
return Math.round((successCount * 100) / 90);
return Math.round((successCount * 100) / 30);
}

return (
Expand All @@ -43,7 +43,7 @@ const ServiceItem: FunctionComponent<ServiceItemProps> = ({ item }) => {
<Icon />
<div className="w-full flex justify-between items-baseline">
<p className="ml-4 text-base font-semibold leading-6 text-gray-900">{item.name}</p>
<p className='text-xs text-gray-400 items-baseline self-baseline'> {calculateUpTime()}% operational in last 90 days</p>
<p className='text-xs text-gray-400 items-baseline self-baseline'> {calculateUpTime()}% operational in last 30 days</p>
</div>

</div>
Expand All @@ -59,4 +59,4 @@ const ServiceItem: FunctionComponent<ServiceItemProps> = ({ item }) => {
)
}

export default ServiceItem;
export default ServiceItem;

0 comments on commit 55c1f11

Please sign in to comment.