mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-31 11:43:32 -05:00
Be Smart
This commit is contained in:
parent
9fc1303f97
commit
e445037996
1 changed files with 2 additions and 8 deletions
|
@ -43,13 +43,7 @@ export default function ActivityTooltip({ activity, application, user, cl }: Rea
|
|||
return icon?.image.src;
|
||||
}, [activity]);
|
||||
const timestamps = useMemo(() => getValidTimestamps(activity), [activity]);
|
||||
let startTime = useMemo(() => getValidStartTimeStamp(activity), [activity]);
|
||||
|
||||
startTime = Number(String(startTime).slice(0, -3));
|
||||
|
||||
if (Number.isNaN(startTime)) {
|
||||
startTime = 9999999999;
|
||||
}
|
||||
const startTime = useMemo(() => getValidStartTimeStamp(activity), [activity]);
|
||||
|
||||
const hasDetails = activity.details ?? activity.state;
|
||||
return (
|
||||
|
@ -63,7 +57,7 @@ export default function ActivityTooltip({ activity, application, user, cl }: Rea
|
|||
<div>{activity.state}</div>
|
||||
{!timestamps && startTime &&
|
||||
<div className={cl("activity-time-bar")}>
|
||||
{formatElapsedTime(moment(startTime), moment())}
|
||||
{formatElapsedTime(moment(startTime / 1000), moment())}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue