Skip to content

Commit

Permalink
Fix typescript and bump redux
Browse files Browse the repository at this point in the history
  • Loading branch information
irdkwmnsb committed Apr 9, 2024
1 parent 7f7ce10 commit efe9eb6
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 56 deletions.
8 changes: 5 additions & 3 deletions src/frontend/overlay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
"version": "3.1.0",
"private": true,
"dependencies": {
"@redux-devtools/extension": "^3.3.0",
"@reduxjs/toolkit": "^1.9.7",
"@types/react-dom": "^18.2.24",
"@vitejs/plugin-react": "^4.0.3",
"typescript": "^5.4.4",
"hls.js": "^1.5.6",
"lodash": "^4.17.21",
"luxon": "^2.3.1",
Expand All @@ -13,12 +16,11 @@
"react": "^18.2.0",
"react-components": "^0.5.1",
"react-dom": "^18.2.0",
"react-redux": "^7.2.6",
"react-redux": "^9.1.0",
"react-router-dom": "^6.3.0",
"react-transition-group": "^4.4.2",
"redux": "^4.1.2",
"redux": "^5.0.1",
"redux-deep-persist": "^1.0.6",
"@redux-devtools/extension": "^3.3.0",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.4.1",
"sass": "^1.58.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,12 @@ export const TeamWebRTCGrabberVideoWrapper = ({ media: { url, peerName, streamTy
{...props}/>);
};

interface HlsPlayerProps
extends React.VideoHTMLAttributes<HTMLVideoElement> {
type HlsPlayerProps = {
src: string;
jwtToken?: string;
// onCanPlay: () => void;
onError?: () => void;
}
} & React.VideoHTMLAttributes<HTMLVideoElement>

function HlsPlayer({
src,
Expand Down
7 changes: 3 additions & 4 deletions src/frontend/overlay/src/redux/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// eslint-disable-next-line no-restricted-imports
import { TypedUseSelectorHook, useDispatch, useSelector } from "react-redux";
import { useDispatch, useSelector } from "react-redux";
import type { RootState, AppDispatch } from "./store";

// Use throughout your app instead of plain `useDispatch` and `useSelector`
export const useAppDispatch: () => AppDispatch = useDispatch;
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
export const useAppDispatch = useDispatch.withTypes<AppDispatch>();
export const useAppSelector =useSelector.withTypes<RootState>();
Loading

0 comments on commit efe9eb6

Please sign in to comment.