Skip to content

Commit cc2ec92

Browse files
committed
Only show offline instructions in offline story
1 parent cc16194 commit cc2ec92

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/ra-core/src/controller/show/ShowBase.stories.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export const Offline = ({
182182
{...props}
183183
offline={<p>You are offline, cannot load data</p>}
184184
>
185-
<Child />
185+
<OfflineChild />
186186
</ShowBase>
187187
</CoreAdminContext>
188188
);
@@ -215,6 +215,10 @@ const defaultProps = {
215215
};
216216

217217
const Child = () => {
218+
return <WithRecord render={record => <p>{record?.test}</p>} />;
219+
};
220+
221+
const OfflineChild = () => {
218222
return (
219223
<>
220224
<p>Use the story controls to simulate offline mode:</p>

0 commit comments

Comments
 (0)