Skip to content

Commit

Permalink
Removed lodash, fixed icons
Browse files Browse the repository at this point in the history
  • Loading branch information
LunatiqueCoder committed Mar 16, 2022
1 parent 7790a22 commit 41acd67
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 15 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
"prepare": "bob build",
"release": "release-it"
},
"dependencies": {
"lodash": "^4.17.21"
},
"dependencies": {},
"peerDependencies": {
"react-native": ">=0.46.0",
"react-native-video": ">=2.0.0"
Expand Down
Binary file modified src/assets/img/forward.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/forward@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/forward@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/img/pause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/img/pause2.png
Binary file not shown.
Binary file modified src/assets/img/pause@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/img/pause@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/img/play.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/img/play2.png
Binary file not shown.
Binary file modified src/assets/img/play@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/img/play@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/img/rewind.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/rewind@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/rewind@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/PlayPause/PlayPause.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ interface PlayPauseProps {
onPressRewind: () => void;
}

const play = require('../../assets/img/play2.png');
const pause = require('../../assets/img/pause2.png');
const play = require('../../assets/img/play.png');
const pause = require('../../assets/img/pause.png');
const rewind = require('../../assets/img/rewind.png');
const forward = require('../../assets/img/forward.png');

Expand Down
26 changes: 16 additions & 10 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import padStart from 'lodash/padStart';
// import padStart from 'lodash/padStart';

export const _onBack = (navigator: any) => {
if (navigator && navigator.pop) {
Expand Down Expand Up @@ -52,19 +52,25 @@ const formatTime = ({
time = Math.min(Math.max(time, 0), duration);

if (!showHours) {
const formattedMinutes = padStart(Math.floor(time / 60).toFixed(0), 2, '0');
const formattedSeconds = padStart(Math.floor(time % 60).toFixed(0), 2, '0');
const formattedMinutes = Math.floor(time / 60)
.toFixed(0)
.padStart(2, '0');
const formattedSeconds = Math.floor(time % 60)
.toFixed(0)
.padStart(2, '0');

return `${symbol}${formattedMinutes}:${formattedSeconds}`;
}

const formattedHours = padStart(Math.floor(time / 3600).toFixed(0), 2, '0');
const formattedMinutes = padStart(
(Math.floor(time / 60) % 60).toFixed(0),
2,
'0',
);
const formattedSeconds = padStart(Math.floor(time % 60).toFixed(0), 2, '0');
const formattedHours = Math.floor(time / 3600)
.toFixed(0)
.padStart(2, '0');
const formattedMinutes = (Math.floor(time / 60) % 60)
.toFixed(0)
.padStart(2, 'a]');
const formattedSeconds = Math.floor(time % 60)
.toFixed(0)
.padStart(2, '0');

return `${symbol}${formattedHours}:${formattedMinutes}:${formattedSeconds}`;
};

0 comments on commit 41acd67

Please sign in to comment.