set a black background body class on enter/exit of component

This commit is contained in:
dannyrb 2020-05-11 22:15:11 -04:00 committed by James A. Petts
parent 1cd643314f
commit 4413572c1c

View File

@ -36,6 +36,14 @@ function StudyListContainer({ history, data: studies }) {
const [expandedRows, setExpandedRows] = useState([]);
const numOfStudies = studies.length;
// Set body style
useEffect(()=> {
document.body.classList.add('bg-black');
return () => {
document.body.classList.remove('bg-black');
}
}, [])
useEffect(() => {
if (!debouncedFilterValues) {
return;