Skip to content

Commit

Permalink
refactor: remove React.ReactNode by type ReactNode (#1058)
Browse files Browse the repository at this point in the history
* refactor: remove React.ReactNode by type ReactNode

* refactor: replace React.ChangeEvent by type ChangeEvent
  • Loading branch information
jy95 authored Dec 1, 2024
1 parent 7b4506d commit 0770437
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ import ToolbarActions from "@/components/dashboard/ToolbarActions";

// Types
import type { Metadata } from 'next/types';
import type { ReactNode } from "react";

export const metadata: Metadata = {
title: 'GamesPassionFR',
description: 'Catalogue des jeux de GamesPassionFR',
}

type Props = {
children: React.ReactNode,
children: ReactNode,
params: Promise<{
locale: "en" | "fr"
}>
Expand Down
5 changes: 4 additions & 1 deletion src/components/GamesView/TitleFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -26,7 +29,7 @@ function TitleFilter() {
label={t("title")}
fullWidth
value={title}
onChange={(event: React.ChangeEvent<HTMLInputElement>) => {
onChange={(event: ChangeEvent<HTMLInputElement>) => {
dispatch(filterByTitle(event.target.value));
}}
/>
Expand Down
3 changes: 2 additions & 1 deletion src/components/dashboard/DashboardAppProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/providers/StoreProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<AppStore>(null)
if (!storeRef.current) {
Expand Down
3 changes: 2 additions & 1 deletion src/providers/ThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down

0 comments on commit 0770437

Please sign in to comment.