Skip to content

Commit

Permalink
fix: Remove usage of deprecated ReactNodeArray which is removed in …
Browse files Browse the repository at this point in the history
…React 19 (amannn#1445)

Fixes amannn#1440
  • Loading branch information
amannn authored Oct 22, 2024
1 parent bfd518d commit eabc93e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/react-server/getTranslator.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ReactElement, ReactNodeArray, cache} from 'react';
import {ReactNode, cache} from 'react';
import {
Formats,
MarkupTranslationValues,
Expand Down Expand Up @@ -59,7 +59,7 @@ function getTranslatorImpl<
key: TargetKey,
values?: RichTranslationValues,
formats?: Formats
): string | ReactElement | ReactNodeArray;
): ReactNode;

// `markup`
markup<
Expand Down
6 changes: 3 additions & 3 deletions src/server/react-server/getTranslations.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ReactElement, ReactNodeArray, cache} from 'react';
import {ReactNode, cache} from 'react';
import {
Formats,
MarkupTranslationValues,
Expand Down Expand Up @@ -64,7 +64,7 @@ Promise<{
key: [TargetKey] extends [never] ? string : TargetKey,
values?: RichTranslationValues,
formats?: Formats
): string | ReactElement | ReactNodeArray;
): ReactNode;

// `markup`
markup<
Expand Down Expand Up @@ -171,7 +171,7 @@ Promise<{
key: TargetKey,
values?: RichTranslationValues,
formats?: Formats
): string | ReactElement | ReactNodeArray;
): ReactNode;

// `markup`
markup<
Expand Down

0 comments on commit eabc93e

Please sign in to comment.