refactor(service-card): replace formatTime with getMinutes for duration display

This commit is contained in:
vchikalkin 2025-07-16 17:19:15 +03:00
parent 4e5fd308c7
commit 4c24ba2c97

View File

@ -2,7 +2,7 @@
import { type ServiceFieldsFragment } from '@repo/graphql/types';
import { cn } from '@repo/ui/lib/utils';
import { formatTime } from '@repo/utils/datetime-format';
import { getMinutes } from '@repo/utils/datetime-format';
type ServiceCardProps = Pick<ServiceFieldsFragment, 'duration' | 'name'>;
@ -24,7 +24,7 @@ export function ServiceCard({ duration, name }: Readonly<ServiceCardProps>) {
>
<path d="M8 1.5a6.5 6.5 0 1 0 0 13a6.5 6.5 0 0 0 0-13ZM2.5 8a5.5 5.5 0 1 1 11 0a5.5 5.5 0 0 1-11 0Zm6-2.75a.5.5 0 0 0-1 0v3c0 .28.22.5.5.5h2a.5.5 0 0 0 0-1H8.5V5.25Z" />
</svg>
{formatTime(duration).user()}
{getMinutes(duration) + ' мин'}
</span>
</div>
</div>