Skip to content

Commit

Permalink
fix camera flicker
Browse files Browse the repository at this point in the history
  • Loading branch information
naueramant committed Jul 27, 2024
1 parent 3a441f9 commit 1b6b2c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/views/Game/components/GamFinishedDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
Stack,
useTheme,
} from "@mui/material";
import { FunctionComponent, useEffect, useState } from "react";
import { FunctionComponent, memo, useEffect, useState } from "react";
import { BsCamera } from "react-icons/bs";
import { PiCameraRotate } from "react-icons/pi";
import { useVideoDevices } from "../../../hooks/camera";
Expand Down Expand Up @@ -107,7 +107,7 @@ const GameFinishedDialog: FunctionComponent<GameFinishedDialogProps> = (
);
};

const Camera: FunctionComponent = () => {
const Camera: FunctionComponent = memo(() => {
const theme = useTheme();

const { devices: cameraDevices, error: cameraError } = useVideoDevices();
Expand Down Expand Up @@ -227,6 +227,6 @@ const Camera: FunctionComponent = () => {
</Stack>
</Stack>
);
};
});

export default GameFinishedDialog;

0 comments on commit 1b6b2c5

Please sign in to comment.