Remove several @ts-nochecks

This commit is contained in:
Darren Clarke 2023-05-25 09:34:43 +00:00
parent 04ecef98da
commit baa1b32737
8 changed files with 7 additions and 13 deletions

View file

@ -1,7 +1,6 @@
// @ts-nocheck
import { FC, useState } from "react"; import { FC, useState } from "react";
import Head from "next/head"; import Head from "next/head";
import { Grid, Button } from "@mui/material"; import { Grid } from "@mui/material";
import { Layout } from "components/Layout"; import { Layout } from "components/Layout";
import Iframe from "react-iframe"; import Iframe from "react-iframe";

View file

@ -1,7 +1,6 @@
// @ts-nocheck
import { FC, useState } from "react"; import { FC, useState } from "react";
import Head from "next/head"; import Head from "next/head";
import { Grid, Button } from "@mui/material"; import { Grid } from "@mui/material";
import { Layout } from "components/Layout"; import { Layout } from "components/Layout";
import Iframe from "react-iframe"; import Iframe from "react-iframe";

View file

@ -1,4 +1,3 @@
// @ts-nocheck
import { FC, useState } from "react"; import { FC, useState } from "react";
import Head from "next/head"; import Head from "next/head";
import { Grid, Button } from "@mui/material"; import { Grid, Button } from "@mui/material";

View file

@ -1,4 +1,3 @@
// @ts-nocheck
/* eslint-disable react/display-name */ /* eslint-disable react/display-name */
import { forwardRef } from "react"; import { forwardRef } from "react";
import useDigitInput, { InputAttributes } from "react-digit-input"; import useDigitInput, { InputAttributes } from "react-digit-input";

View file

@ -1,4 +1,3 @@
// @ts-nocheck
/* eslint-disable camelcase */ /* eslint-disable camelcase */
import { FC, useState } from "react"; import { FC, useState } from "react";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";

View file

@ -1,4 +1,3 @@
// @ts-nocheck
import { FC, PropsWithChildren, Fragment, ReactElement } from "react"; import { FC, PropsWithChildren, Fragment, ReactElement } from "react";
import ExpandMore from "@mui/icons-material/ExpandMore"; import ExpandMore from "@mui/icons-material/ExpandMore";
import List from "@mui/material/List"; import List from "@mui/material/List";
@ -10,7 +9,7 @@ import Tooltip from "@mui/material/Tooltip";
import { makeStyles } from "@mui/material/styles"; import { makeStyles } from "@mui/material/styles";
import { useTranslate } from "react-admin"; import { useTranslate } from "react-admin";
const useStyles = makeStyles((theme) => ({ const useStyles = makeStyles((theme: any) => ({
icon: { minWidth: theme.spacing(5) }, icon: { minWidth: theme.spacing(5) },
sidebarIsOpen: { sidebarIsOpen: {
"& a": { "& a": {
@ -45,9 +44,11 @@ export const SubMenu: FC<SubMenuProps> = ({
dense, dense,
}) => { }) => {
const translate = useTranslate(); const translate = useTranslate();
// @ts-expect-error
const classes = useStyles(); const classes = useStyles();
const header = ( const header = (
// @ts-expect-error
<MenuItem dense={dense} button onClick={handleToggle}> <MenuItem dense={dense} button onClick={handleToggle}>
<ListItemIcon className={classes.icon}> <ListItemIcon className={classes.icon}>
{isOpen ? <ExpandMore /> : icon} {isOpen ? <ExpandMore /> : icon}

View file

@ -1,4 +1,3 @@
// @ts-nocheck
import React, { useState } from "react"; import React, { useState } from "react";
import { import {
Show, Show,

View file

@ -1,10 +1,9 @@
// @ts-nocheck
import { NextPage } from "next"; import { NextPage } from "next";
import { Typography, Box, Button, Grid, Link } from "@mui/material"; import { Typography, Box, Button, Grid, Link } from "@mui/material";
import { FC, useEffect } from "react"; import { FC, useEffect, PropsWithChildren } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
export const RedirectToAdmin: FC = ({ children }) => { export const RedirectToAdmin: FC<PropsWithChildren> = ({ children }) => {
const router = useRouter(); const router = useRouter();
useEffect(() => { useEffect(() => {
router.push("/admin"); router.push("/admin");