Skip to content

Commit dce7ead

Browse files
committed
chore: types
1 parent 5d690b3 commit dce7ead

File tree

7 files changed

+14
-7
lines changed

7 files changed

+14
-7
lines changed

electron/renderer/components/game/game-compass.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { EuiIcon } from '@elastic/eui';
22
import { css } from '@emotion/react';
33
import type React from 'react';
4+
import type { ReactNode } from 'react';
45
import { useMemo, useState } from 'react';
56
import type { GameEvent } from '../../../common/game/types.js';
67
import { GameEventType } from '../../../common/game/types.js';
@@ -57,7 +58,7 @@ const compassPoints: Array<CompassPoint> = [
5758
{ name: 'nw', rotation: 225 },
5859
];
5960

60-
export const GameCompass: React.FC = () => {
61+
export const GameCompass: React.FC = (): ReactNode => {
6162
const [obviousPaths, setObviousPaths] = useState<Array<string>>([]);
6263

6364
// Every time the character changes rooms, the game sends a compass event

electron/renderer/components/game/game-stream-text.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { EuiText, useEuiTheme } from '@elastic/eui';
22
import { type SerializedStyles, css } from '@emotion/react';
3+
import type { ReactNode } from 'react';
34
import { memo, useMemo } from 'react';
45
import type { GameLogLine } from '../../types/game.types.jsx';
56

@@ -15,7 +16,7 @@ export interface GameStreamTextProps {
1516
* we do rerender all the log lines to apply the new styling effects.
1617
*/
1718
export const GameStreamText: React.FC<GameStreamTextProps> = memo(
18-
(props: GameStreamTextProps) => {
19+
(props: GameStreamTextProps): ReactNode => {
1920
const { logLine } = props;
2021

2122
const { euiTheme } = useEuiTheme();

electron/renderer/context/game.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export interface GameProviderProps {
4141

4242
export const GameProvider: React.FC<GameProviderProps> = (
4343
props: GameProviderProps
44-
) => {
44+
): ReactNode => {
4545
const { children } = props;
4646

4747
const logger = useLogger('renderer:context:game');

electron/renderer/context/logger.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export interface LoggerProviderProps {
3939

4040
export const LoggerProvider: React.FC<LoggerProviderProps> = (
4141
props: LoggerProviderProps
42-
) => {
42+
): ReactNode => {
4343
const { children, logger = defaultLogger } = props;
4444

4545
useEffect(() => {

electron/renderer/context/theme.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface ThemeProviderProps {
3636

3737
export const ThemeProvider: React.FC<ThemeProviderProps> = (
3838
props: ThemeProviderProps
39-
) => {
39+
): ReactNode => {
4040
const { children } = props;
4141

4242
const [colorMode, setColorMode] = useState<EuiThemeColorMode>(getThemeName());

electron/renderer/pages/_app.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import { EuiErrorBoundary } from '@elastic/eui';
55
import type { AppProps } from 'next/app';
66
import Head from 'next/head';
7+
import type { ReactNode } from 'react';
78
import { Layout } from '../components/layout.jsx';
89
import { NoSSRBoundary } from '../components/no-ssr/no-ssr.jsx';
910
import { GameProvider } from '../context/game.jsx';
@@ -16,7 +17,10 @@ import { ThemeProvider } from '../context/theme.jsx';
1617
*
1718
* @see https://nextjs.org/docs/advanced-features/custom-app
1819
*/
19-
const App: React.FC<AppProps> = ({ Component, pageProps }: AppProps) => (
20+
const App: React.FC<AppProps> = ({
21+
Component,
22+
pageProps,
23+
}: AppProps): ReactNode => (
2024
<>
2125
<Head>
2226
<title>DragonRealms Phoenix</title>

electron/renderer/pages/_document.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import { Head, Html, Main, NextScript } from 'next/document';
55
import type React from 'react';
6+
import type { ReactNode } from 'react';
67

78
/**
89
* A custom `Document` is commonly used to augment your application's
@@ -11,7 +12,7 @@ import type React from 'react';
1112
*
1213
* @see https://nextjs.org/docs/advanced-features/custom-document
1314
*/
14-
const Document: React.FC = () => {
15+
const Document: React.FC = (): ReactNode => {
1516
return (
1617
<Html lang="en">
1718
<Head>

0 commit comments

Comments
 (0)