Skip to content

Commit

Permalink
fix recording loss on tab change (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasbach committed Jun 17, 2024
1 parent 35a7f97 commit a69ef7f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/renderer/recorder/recorder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
TextField,
} from "@radix-ui/themes";

import { forwardRef, useEffect } from "react";
import { forwardRef } from "react";
import { useRecorderState } from "./state";
import { MicSelector } from "./mic-selector";
import { useMicSources } from "./hooks";
Expand All @@ -23,13 +23,13 @@ export const Recorder = forwardRef<HTMLDivElement>((_, ref) => {
recorder,
meta,
setMeta,
reset,
} = useRecorderState();

useEffect(() => {
reset();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
// not sure why that was needed?
// useEffect(() => {
// reset();
// // eslint-disable-next-line react-hooks/exhaustive-deps
// }, []);

if (recorder) {
return <RecorderInsession ref={ref} />;
Expand Down

0 comments on commit a69ef7f

Please sign in to comment.