Imported the directory structure from egg trainer
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
//applies the classname of 'body'
|
||||
const ApplyToBody = (props) => {
|
||||
|
||||
useEffect(() => {
|
||||
document.body.classList.add(props.className);
|
||||
|
||||
return () => {
|
||||
document.body.classList.remove(props.className);
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<></>
|
||||
);
|
||||
};
|
||||
|
||||
export default ApplyToBody;
|
||||
Reference in New Issue
Block a user