Skip to content

Commit 60aa3ec

Browse files
Update App.js
1 parent 496be9c commit 60aa3ec

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

admin-js/src/App.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,8 @@ const AiohttpAppBar = () => (
445445
);
446446

447447
const App = (props) => {
448-
STATE = props["aiohttpState"];
448+
const {aiohttpState, ...adminProps} = props;
449+
STATE = aiohttpState;
449450
const [loaded, setLoaded] = useState(STATE["js_module"] === null);
450451
if (!loaded) {
451452
// The inline comment skips the webpack import() and allows us to use the native
@@ -459,7 +460,7 @@ const App = (props) => {
459460
}
460461

461462
return (
462-
<Admin dataProvider={dataProvider} authProvider={authProvider} title={STATE["view"]["name"]}
463+
<Admin {...adminProps} dataProvider={dataProvider} authProvider={authProvider} title={STATE["view"]["name"]}
463464
layout={(props) => <Layout {...props} appBar={AiohttpAppBar} />} disableTelemetry requireAuth>
464465
{permissions => createResources(STATE["resources"], permissions)}
465466
</Admin>

0 commit comments

Comments
 (0)