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 11c7769 commit 086d32a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 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) / 30);
return Math.round((successCount * 100) / 90);
}

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 30 days</p>
<p className='text-xs text-gray-400 items-baseline self-baseline'> {calculateUpTime()}% operational in last 90 days</p>
</div>

</div>
Expand Down

0 comments on commit 086d32a

Please sign in to comment.