Build and type fixes

This commit is contained in:
Darren Clarke 2023-05-24 20:27:57 +00:00
parent d5bd58ac3e
commit 656f3fbe71
64 changed files with 1878 additions and 1501 deletions

View file

@ -5,7 +5,19 @@ import { useRouter } from "next/router";
import { useTranslate } from "react-polyglot";
import { useAppContext } from "./AppProvider";
const CheckboxItem = ({ title, description, checked, onChange }) => {
type CheckboxItemProps = {
title: string;
description: string;
checked: boolean;
onChange: () => void;
};
const CheckboxItem: FC<CheckboxItemProps> = ({
title,
description,
checked,
onChange,
}) => {
const {
typography: { p, small },
} = useAppContext();
@ -48,10 +60,10 @@ export const GettingStartedDialog: FC = () => {
typography: { h4 },
} = useAppContext();
const t = useTranslate();
const [completedItems, setCompletedItems] = useState([]);
const [completedItems, setCompletedItems] = useState([] as any[]);
const router = useRouter();
const open = router.query.tooltip?.toString() === "checklist";
const toggleCompletedItem = (item) => {
const toggleCompletedItem = (item: any) => {
if (completedItems.includes(item)) {
setCompletedItems(completedItems.filter((i) => i !== item));
} else {