Skip to content

Commit

Permalink
fix: remove useless reduce function
Browse files Browse the repository at this point in the history
  • Loading branch information
ambar committed Sep 17, 2021
1 parent 30c2802 commit c45b16c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 96 deletions.
66 changes: 0 additions & 66 deletions packages/griffith-utils/src/__tests__/math.spec.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/griffith-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ export {default as logger} from './logger'
export {default as ua} from './ua'
export {default as isMSESupported} from './isMSESupported'
export {default as isHlsNativeSupported} from './isHlsNativeSupported'
export {getGCD, reduce} from './math'
export {default as sequence} from './sequence'
26 changes: 0 additions & 26 deletions packages/griffith-utils/src/math.ts

This file was deleted.

4 changes: 1 addition & 3 deletions packages/griffith/src/contexts/PositionProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, {useRef, useEffect, useState, useMemo} from 'react'
import {css} from 'aphrodite/no-important'
import {reduce} from 'griffith-utils'
import useHandler from '../hooks/useHandler'
import usePrevious from '../hooks/usePrevious'
import listenResize from '../utils/listenResize'
Expand Down Expand Up @@ -34,8 +33,7 @@ const PositionProvider: React.FC<Props> = ({children}) => {
if (!videoWidth || !videoHeight) {
return
}
const [width, height] = reduce(videoWidth, videoHeight)
setHelperImageSrc(createHolderImageSrc(width, height))
setHelperImageSrc(createHolderImageSrc(videoWidth, videoHeight))
})

const updateIsFullWidth = useHandler(() => {
Expand Down

0 comments on commit c45b16c

Please sign in to comment.