diff --git a/apps/leafcutter/pages/_document.tsx b/apps/leafcutter/pages/_document.tsx
index dc314e6..c023ed5 100644
--- a/apps/leafcutter/pages/_document.tsx
+++ b/apps/leafcutter/pages/_document.tsx
@@ -25,7 +25,7 @@ LeafcutterDocument.getInitialProps = async (ctx) => {
ctx.renderPage = () =>
originalRenderPage({
- enhanceApp: (App: any) => (props) =>
+ enhanceApp: (App: any) => (props: any) =>
,
});
diff --git a/apps/link/pages/_document.tsx b/apps/link/pages/_document.tsx
index 986ee3e..f0347fa 100644
--- a/apps/link/pages/_document.tsx
+++ b/apps/link/pages/_document.tsx
@@ -25,7 +25,7 @@ LinkDocument.getInitialProps = async (ctx) => {
ctx.renderPage = () =>
originalRenderPage({
- enhanceApp: (App: any) => (props) =>
+ enhanceApp: (App: any) => (props: any) =>
,
});
diff --git a/apps/metamigo-frontend/components/AdminLogin.tsx b/apps/metamigo-frontend/components/AdminLogin.tsx
index bee7c86..c5972e5 100644
--- a/apps/metamigo-frontend/components/AdminLogin.tsx
+++ b/apps/metamigo-frontend/components/AdminLogin.tsx
@@ -28,12 +28,16 @@ export const authProvider = {
if (e.networkError && e.networkError.statusCode === 401) {
return Promise.reject();
}
+
+ return Promise.resolve();
},
checkAuth: async () => {
const session = await getSession();
if (!session) {
return Promise.reject();
}
+
+ return Promise.resolve();
},
getIdentity: async () => {
const session = await getSession();
diff --git a/apps/metamigo-frontend/components/Auth.tsx b/apps/metamigo-frontend/components/Auth.tsx
index 9828f8a..aa1673c 100644
--- a/apps/metamigo-frontend/components/Auth.tsx
+++ b/apps/metamigo-frontend/components/Auth.tsx
@@ -1,9 +1,9 @@
-import { FC, PropsWithChildren, useEffect } from "react";
+import { FC, useEffect } from "react";
import { CircularProgress } from "@material-ui/core";
import { useSession } from "next-auth/react";
import { useRouter } from "next/router";
-export const Auth: FC = ({ children }) => {
+export const Auth: FC = ({ children }) => {
const router = useRouter();
const { data: session, status: loading } = useSession();
useEffect(() => {
diff --git a/apps/metamigo-frontend/components/accounts/AccountEdit.tsx b/apps/metamigo-frontend/components/accounts/AccountEdit.tsx
index bdbc463..e4c3866 100644
--- a/apps/metamigo-frontend/components/accounts/AccountEdit.tsx
+++ b/apps/metamigo-frontend/components/accounts/AccountEdit.tsx
@@ -25,7 +25,7 @@ type AccountEditToolbarProps = {
record?: any;
};
-const AccountEditToolbar: FC = (props) => {
+const AccountEditToolbar: FC = (props: any) => {
const { data: session } = useSession();
const classes = useStyles(props);
return (
diff --git a/apps/metamigo-frontend/components/accounts/AccountList.tsx b/apps/metamigo-frontend/components/accounts/AccountList.tsx
index 1ce42bf..9bfec3c 100644
--- a/apps/metamigo-frontend/components/accounts/AccountList.tsx
+++ b/apps/metamigo-frontend/components/accounts/AccountList.tsx
@@ -14,9 +14,10 @@ type DeleteNotSelfButtonProps = {
record?: any;
};
-const DeleteNotSelfButton: FC = (props) => {
+const DeleteNotSelfButton: FC = (props: any) => {
const { data: session } = useSession();
return (
+ // @ts-ignore
{
variant="outlined"
label="Message"
multiline
- rows={3}
+ minRows={3}
fullWidth
size="small"
value={message}
@@ -156,15 +156,15 @@ const handleRequestCode = async ({
"Content-Type": "application/json",
},
});
+
+ if (response && response.ok) {
+ onSuccess();
+ } else {
+ onFailure(response.status || 400);
+ }
} catch (error: any) {
console.error("Failed to request verification code:", error);
}
-
- if (response && response.ok) {
- onSuccess();
- } else {
- onFailure(response.status || 400);
- }
};
const VerificationCodeRequest = ({
@@ -222,7 +222,7 @@ const VerificationCaptcha = ({
setSubmitting(false);
};
- const handleCaptchaChange = (value) => {
+ const handleCaptchaChange = (value: any) => {
if (value)
setCode(
value
@@ -268,16 +268,16 @@ const VerificationCodeInput = ({
handleClose,
handleRestartVerification,
confirmVerification,
-}) => {
+}: any) => {
const [code, setValue] = React.useState("");
const [isSubmitting, setSubmitting] = React.useState(false);
const [isValid, setValid] = React.useState(false);
const [submissionError, setSubmissionError] = React.useState(undefined);
const translate = useTranslate();
- const validator = (v) => v.trim().length === 6;
+ const validator = (v: any) => v.trim().length === 6;
- const handleValueChange = (newValue) => {
+ const handleValueChange = (newValue: any) => {
setValue(newValue);
setValid(validator(newValue));
};
@@ -300,11 +300,14 @@ const VerificationCodeInput = ({
if (response.status === 200) {
confirmVerification();
} else if (responseBody.message)
+ // @ts-expect-error
setSubmissionError(`Error: ${responseBody.message}`);
- else
+ else {
setSubmissionError(
+ // @ts-expect-error
"There was an error, sorry about that. Please try again later or contact support."
);
+ }
};
const title =
@@ -355,7 +358,7 @@ const VerificationCodeInput = ({
);
};
-const VerificationCodeDialog = (props) => {
+const VerificationCodeDialog = (props: any) => {
const [stage, setStage] = React.useState("request");
const onRequestSuccess = () => setStage("verify");
const onRestartVerification = () => setStage("request");
@@ -406,7 +409,7 @@ const VerificationCodeDialog = (props) => {
);
};
-const SignalBotShowActions = ({ basePath, data }) => {
+const SignalBotShowActions = ({ basePath, data }: any) => {
const [open, setOpen] = React.useState(false);
const [verifyMode, setVerifyMode] = React.useState("");
const refresh = useRefresh();
@@ -429,7 +432,7 @@ const SignalBotShowActions = ({ basePath, data }) => {
return (
-
+
{data && !data.isVerified && (