Skip to content

Commit

Permalink
Merge pull request #10353 from marmelab/Fix/SimpleList_ErrorInFetch_s…
Browse files Browse the repository at this point in the history
…tory

Fix `SimpleList` `ErrorInFetch` story
  • Loading branch information
djhi authored Nov 15, 2024
2 parents d203612 + e22b7bd commit 4f4fb95
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,19 +253,21 @@ export const NoPrimaryText = () => (

export const ErrorInFetch = () => (
<TestMemoryRouter>
<ListContextProvider
value={
{
error: new Error('Error in dataProvider'),
} as any
}
>
<SimpleList
primaryText={record => record.title}
secondaryText={record => record.author}
tertiaryText={record => record.year}
/>
</ListContextProvider>
<ResourceContextProvider value="books">
<ListContextProvider
value={
{
error: new Error('Error in dataProvider'),
} as any
}
>
<SimpleList
primaryText={record => record.title}
secondaryText={record => record.author}
tertiaryText={record => record.year}
/>
</ListContextProvider>
</ResourceContextProvider>
</TestMemoryRouter>
);

Expand Down

0 comments on commit 4f4fb95

Please sign in to comment.