-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #192 from BinaryStudioAcademy/task/OV-162-play-but…
…ton-control-cursor OV-162: Play button control cursor
- Loading branch information
Showing
12 changed files
with
130 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...on/components/upload-video/components/video-player/components/control/libs/hooks/hooks.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
6 changes: 2 additions & 4 deletions
6
frontend/src/bundles/common/hooks/use-app-selector/use-app-selector.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import { type TypedUseSelectorHook, useSelector } from 'react-redux'; | ||
|
||
import { type store } from '~/framework/store/store.js'; | ||
import { type RootState } from '~/bundles/common/types/types.js'; | ||
|
||
const useAppSelector: TypedUseSelectorHook< | ||
ReturnType<typeof store.instance.getState> | ||
> = useSelector; | ||
const useAppSelector: TypedUseSelectorHook<RootState> = useSelector; | ||
|
||
export { useAppSelector }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { type store } from '~/framework/store/store.js'; | ||
|
||
type RootState = ReturnType<typeof store.instance.getState>; | ||
|
||
export { type RootState }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 10 additions & 8 deletions
18
...nd/src/bundles/studio/components/player-controls/components/time-display/time-display.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { createSelector } from '@reduxjs/toolkit'; | ||
import { secondsToMilliseconds } from 'date-fns'; | ||
|
||
import { type RootState } from '~/bundles/common/types/types.js'; | ||
|
||
import { type Scene } from '../types/types.js'; | ||
|
||
const selectScenes = (state: RootState): Scene[] => state.studio.scenes; | ||
|
||
const selectTotalDuration = createSelector([selectScenes], (scenes) => { | ||
const totalDuration = scenes.reduce( | ||
(total, scene) => total + scene.duration, | ||
0, | ||
); | ||
|
||
return secondsToMilliseconds(totalDuration); | ||
}); | ||
|
||
export { selectTotalDuration }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters