Skip to content

Commit

Permalink
馃挬(frontend) issue ts with grommet component List
Browse files Browse the repository at this point in the history
The children prop of the List component from grommet is not typed
correctly.
An issue has been open on their repo:
grommet/grommet#6836
Here is a quick fix for the time being.
  • Loading branch information
AntoLC committed Jun 13, 2023
1 parent b210cfb commit cfe867c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
Button,
Form,
FormField,
List,
ListExtendedProps,
Spinner,
Text,
TextInput,
Expand All @@ -22,6 +22,10 @@ import {
} from 'lib-components';
import { usePlaylist, useUpdatePlaylist } from '../../data/queries';

declare const List: <ListItemType = string | unknown>(
p: ListExtendedProps<ListItemType>,
) => React.ReactElement<ListExtendedProps<ListItemType>>;

const messages = defineMessages({
loadingPlaylist: {
defaultMessage: 'Loading playlist...',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { Box, Button, List, Paragraph } from 'grommet';
import { Box, Button, ListExtendedProps, Paragraph } from 'grommet';
import { normalizeColor } from 'grommet/utils';
import { AddCircle } from 'grommet-icons';
import { colors } from 'lib-common';
Expand All @@ -25,6 +25,10 @@ import {
sortParticipantNotOnStage,
} from './utils';

declare const List: <ListItemType = string | unknown>(
p: ListExtendedProps<ListItemType>,
) => React.ReactElement<ListExtendedProps<ListItemType>>;

const messages = defineMessages({
demands: {
defaultMessage: 'Demands',
Expand Down

0 comments on commit cfe867c

Please sign in to comment.