Fix more build errors

This commit is contained in:
Darren Clarke 2023-03-15 12:17:43 +00:00
parent 1bdc1e60db
commit 30ce47826f
61 changed files with 1161 additions and 541 deletions

View file

@ -8,14 +8,13 @@ import { makeStyles, useTheme } from "@material-ui/core/styles";
import AudioPlayer from "material-ui-audio-player";
import { useStopwatch } from "react-timer-hook";
import style from "./MicInput.module.css";
//import type { ReactMicProps } from "react-mic";
// import type { ReactMicProps } from "react-mic";
const ReactMic = dynamic<any>(
// eslint-disable-next-line promise/prefer-await-to-then
() => {
throw new Error(
"MIC INPUT FEATURE IS DISABLED"
); /*return import("react-mic").then((mod) => mod.ReactMic);*/
); /* return import("react-mic").then((mod) => mod.ReactMic); */
},
{ ssr: false }
);
@ -58,7 +57,7 @@ const MicInput = (props: any) => {
field: { value, onChange },
} = useInput(props);
let [record, setRecorder] = useState({ record: false });
const [record, setRecorder] = useState({ record: false });
const decodedValue = resultToDataUri(value);
const startRecording = () => {
setRecorder({ record: true });
@ -71,7 +70,9 @@ const MicInput = (props: any) => {
pause();
};
async function onData(recordedBlob: any) {}
async function onData(recordedBlob: any) {
console.log({ recordedBlob });
}
async function onStop(recordedBlob: any) {
const result = await blobToResult(recordedBlob.blob);
@ -84,16 +85,14 @@ const MicInput = (props: any) => {
.toString()
.padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`;
const useStyles = makeStyles((theme) => {
return {
volumeIcon: {
display: "none",
},
mainSlider: {
display: "none",
},
};
});
const useStyles = makeStyles(() => ({
volumeIcon: {
display: "none",
},
mainSlider: {
display: "none",
},
}));
return (
<div className="MuiFormControl-marginDense RaFormInput-input-40">