style: simplify timer badge
This commit is contained in:
parent
d56bb3e7b3
commit
e3578724c2
1 changed files with 1 additions and 7 deletions
|
|
@ -190,7 +190,6 @@ export function TicketSummaryHeader({ ticket }: TicketHeaderProps) {
|
||||||
const totalWorkedMs = workSummary ? workSummary.totalWorkedMs + currentSessionMs : 0
|
const totalWorkedMs = workSummary ? workSummary.totalWorkedMs + currentSessionMs : 0
|
||||||
|
|
||||||
const formattedTotalWorked = useMemo(() => formatDuration(totalWorkedMs), [totalWorkedMs])
|
const formattedTotalWorked = useMemo(() => formatDuration(totalWorkedMs), [totalWorkedMs])
|
||||||
const formattedCurrentSession = useMemo(() => formatDuration(currentSessionMs), [currentSessionMs])
|
|
||||||
const updatedRelative = useMemo(
|
const updatedRelative = useMemo(
|
||||||
() => formatDistanceToNow(ticket.updatedAt, { addSuffix: true, locale: ptBR }),
|
() => formatDistanceToNow(ticket.updatedAt, { addSuffix: true, locale: ptBR }),
|
||||||
[ticket.updatedAt]
|
[ticket.updatedAt]
|
||||||
|
|
@ -199,14 +198,9 @@ export function TicketSummaryHeader({ ticket }: TicketHeaderProps) {
|
||||||
return (
|
return (
|
||||||
<div className={cardClass}>
|
<div className={cardClass}>
|
||||||
<div className="absolute right-6 top-6 flex items-center gap-3">
|
<div className="absolute right-6 top-6 flex items-center gap-3">
|
||||||
{isPlaying ? (
|
|
||||||
<Badge className="inline-flex h-9 items-center gap-2 rounded-full border border-black bg-black px-3 text-sm font-semibold text-white">
|
|
||||||
<IconClock className="size-4" /> Sessão atual: {formattedCurrentSession}
|
|
||||||
</Badge>
|
|
||||||
) : null}
|
|
||||||
{workSummary ? (
|
{workSummary ? (
|
||||||
<Badge className="inline-flex h-9 items-center gap-2 rounded-full border border-slate-200 bg-white px-3 text-sm font-semibold text-neutral-700">
|
<Badge className="inline-flex h-9 items-center gap-2 rounded-full border border-slate-200 bg-white px-3 text-sm font-semibold text-neutral-700">
|
||||||
Tempo total: {formattedTotalWorked}
|
<IconClock className="size-4 text-neutral-700" /> Tempo total: {formattedTotalWorked}
|
||||||
</Badge>
|
</Badge>
|
||||||
) : null}
|
) : null}
|
||||||
{!editing ? (
|
{!editing ? (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue