Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove React.ReactNode by type ReactNode #1058

Merged
merged 2 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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