Browse Source

fix(replays): Fix duration in header (#38066)

Previously we we had replay.durationMS, but now that replayRecord.duration exists, and is in seconds, we can drop this other stuff
Ryan Albrecht 2 years ago
parent
commit
44186bb172
1 changed files with 1 additions and 9 deletions
  1. 1 9
      static/app/views/replays/detail/replayMetaData.tsx

+ 1 - 9
static/app/views/replays/detail/replayMetaData.tsx

@@ -51,11 +51,7 @@ function ReplayMetaData({replayRecord}: Props) {
         {replayRecord ? (
           <React.Fragment>
             <IconClock color="gray300" />
-            <Duration
-              seconds={Math.floor(msToSec(replayRecord?.duration || 0)) || 1}
-              abbreviation
-              exact
-            />
+            <Duration seconds={replayRecord?.duration} abbreviation exact />
           </React.Fragment>
         ) : (
           <HeaderPlaceholder />
@@ -75,10 +71,6 @@ function ReplayMetaData({replayRecord}: Props) {
   );
 }
 
-function msToSec(ms: number) {
-  return ms / 1000;
-}
-
 export const HeaderPlaceholder = styled(function HeaderPlaceholder(
   props: React.ComponentProps<typeof Placeholder>
 ) {