diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx index 1962d015..ef62efbd 100644 --- a/src/app/[locale]/layout.tsx +++ b/src/app/[locale]/layout.tsx @@ -19,6 +19,7 @@ import ToolbarActions from "@/components/dashboard/ToolbarActions"; // Types import type { Metadata } from 'next/types'; +import type { ReactNode } from "react"; export const metadata: Metadata = { title: 'GamesPassionFR', @@ -26,7 +27,7 @@ export const metadata: Metadata = { } type Props = { - children: React.ReactNode, + children: ReactNode, params: Promise<{ locale: "en" | "fr" }> diff --git a/src/components/GamesView/TitleFilter.tsx b/src/components/GamesView/TitleFilter.tsx index aa5e4bf2..c5bb3e39 100644 --- a/src/components/GamesView/TitleFilter.tsx +++ b/src/components/GamesView/TitleFilter.tsx @@ -12,6 +12,9 @@ from "@/redux/features/gamesSlice"; // React Material UI import TextField from '@mui/material/TextField'; +// Types +import type { ChangeEvent } from "react"; + function TitleFilter() { const t = useTranslations("gamesLibrary.filtersLabels") @@ -26,7 +29,7 @@ function TitleFilter() { label={t("title")} fullWidth value={title} - onChange={(event: React.ChangeEvent) => { + onChange={(event: ChangeEvent) => { dispatch(filterByTitle(event.target.value)); }} /> diff --git a/src/components/dashboard/DashboardAppProvider.tsx b/src/components/dashboard/DashboardAppProvider.tsx index 11bb5b70..33609074 100644 --- a/src/components/dashboard/DashboardAppProvider.tsx +++ b/src/components/dashboard/DashboardAppProvider.tsx @@ -18,11 +18,12 @@ import ExtensionIcon from '@mui/icons-material/Extension'; // Types import type { Navigation } from '@toolpad/core/AppProvider'; +import type { ReactNode } from "react"; export default function DashboardAppProvider({ children, }: { - children: React.ReactNode + children: ReactNode }) { // Fetch labels diff --git a/src/providers/StoreProvider.tsx b/src/providers/StoreProvider.tsx index 4b7c7ea4..61c31841 100644 --- a/src/providers/StoreProvider.tsx +++ b/src/providers/StoreProvider.tsx @@ -3,10 +3,12 @@ import { useRef } from 'react' import { Provider } from 'react-redux' import { makeStore, AppStore } from '../redux/Store' +import type { ReactNode } from "react"; + export default function StoreProvider({ children, }: { - children: React.ReactNode + children: ReactNode }) { const storeRef = useRef(null) if (!storeRef.current) { diff --git a/src/providers/ThemeProvider.tsx b/src/providers/ThemeProvider.tsx index a3f9ce40..7d1119ee 100644 --- a/src/providers/ThemeProvider.tsx +++ b/src/providers/ThemeProvider.tsx @@ -5,8 +5,9 @@ import { createTheme, ThemeProvider as MUIThemeProvider } from '@mui/material/st import { useMemo } from 'react'; import { useAsyncMemo } from '@/hooks/useAsyncMemo'; +import type { ReactNode } from "react"; -export function ThemeProvider({ children, lng }: { children: React.ReactNode, lng : string }) { +export function ThemeProvider({ children, lng }: { children: ReactNode, lng : string }) { // Prepare theme for possible darkmode const muiLanguage = useAsyncMemo(async () => {