diff --git a/examples/stateful-sidebar-with-dialog/src/index.jsx b/examples/stateful-sidebar-with-dialog/src/index.jsx index 0781fb4d9e..342174f377 100644 --- a/examples/stateful-sidebar-with-dialog/src/index.jsx +++ b/examples/stateful-sidebar-with-dialog/src/index.jsx @@ -18,7 +18,7 @@ if (process.env.NODE_ENV === 'development' && window.self === window.top) { root.render( - + ); } diff --git a/examples/stateful-sidebar-with-dialog/src/locations/Dialog.jsx b/examples/stateful-sidebar-with-dialog/src/locations/Dialog.jsx index d7a089c427..bdeb31f0bd 100644 --- a/examples/stateful-sidebar-with-dialog/src/locations/Dialog.jsx +++ b/examples/stateful-sidebar-with-dialog/src/locations/Dialog.jsx @@ -5,7 +5,7 @@ import { reducer } from '../model/reducerAndInitialSidebarState'; const Dialog = () => { const sdk = useSDK(); - const { serializedSidebarState } = (sdk.parameters.invocation || {}); + const { serializedSidebarState } = sdk.parameters.invocation || {}; const [state, dispatch] = useReducer(reducer, {}); /* To use the cma, inject it as follows. @@ -20,20 +20,27 @@ const Dialog = () => { }); }, []); - return <> - Hello Dialog Component (AppId: {sdk.ids.app}) - {`Time is ${state.timestamp}`} - - - ; + return ( + <> + Hello Dialog Component (AppId: {sdk.ids.app}) + {`Time is ${state.timestamp}`} + + + + ); }; export default Dialog; diff --git a/examples/stateful-sidebar-with-dialog/src/locations/Sidebar.jsx b/examples/stateful-sidebar-with-dialog/src/locations/Sidebar.jsx index 3cf3c33fce..5aa0d5f669 100644 --- a/examples/stateful-sidebar-with-dialog/src/locations/Sidebar.jsx +++ b/examples/stateful-sidebar-with-dialog/src/locations/Sidebar.jsx @@ -21,33 +21,41 @@ const Sidebar = () => { const someParameter = 'some parameter'; - return <> - Hello Sidebar Component (AppId: {sdk.ids.app}) - {`Time is ${state.timestamp}`} - - - ; + return ( + <> + Hello Sidebar Component (AppId: {sdk.ids.app}) + {`Time is ${state.timestamp}`} + + + + ); }; export default Sidebar; diff --git a/examples/stateful-sidebar-with-dialog/src/model/reducerAndInitialSidebarState.js b/examples/stateful-sidebar-with-dialog/src/model/reducerAndInitialSidebarState.js index fc7d6c9231..dba5ca2780 100644 --- a/examples/stateful-sidebar-with-dialog/src/model/reducerAndInitialSidebarState.js +++ b/examples/stateful-sidebar-with-dialog/src/model/reducerAndInitialSidebarState.js @@ -1,5 +1,3 @@ - - export function reducer(state, { type, payload }) { if (type === 'SET_TIME') { return { @@ -16,6 +14,6 @@ export function reducer(state, { type, payload }) { export function initialSidebarState() { return { - timestamp: 'SET ME!' + timestamp: 'SET ME!', }; -} \ No newline at end of file +}