diff --git a/src/modules/a11y/components/A11yLiveMessage/index.js b/src/modules/a11y/components/A11yLiveMessage/index.js index 74dc9922..1d8b43d6 100644 --- a/src/modules/a11y/components/A11yLiveMessage/index.js +++ b/src/modules/a11y/components/A11yLiveMessage/index.js @@ -2,13 +2,17 @@ import React from 'react'; import { useSelector } from 'react-redux'; const A11yLiveMessage = () => { - const a11yMessage = useSelector((state) => { - return state.a11y.message; + const a11y = useSelector((state) => { + return state.a11y; }); + if (!a11y) { + return null; + } + return (
- {a11yMessage} + {a11y}
); }; diff --git a/src/store.js b/src/store.js index 4accb777..5a15fb4b 100644 --- a/src/store.js +++ b/src/store.js @@ -23,7 +23,7 @@ const store = configureStore({ return [...getDefaultMiddleware({ immutableCheck: false })]; }, reducer: { - a11y: simpleReducer(SET_A11Y_MESSAGE, { message: '' }), + a11y: simpleReducer(SET_A11Y_MESSAGE, null), advanced: advancedReducer, affiliation: affiliationReducer, browse: browseReducer,