Created
April 1, 2022 16:54
-
-
Save Manntrix/e76aa0b88e6626ee3b94230bd7f17c3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "../styles/globals.css"; | |
import { useEffect } from "react"; | |
import PathName from "../hooks/pathName"; | |
function MyApp({ Component, pageProps }) { | |
const path = PathName(); | |
useEffect(() => { | |
document.body.className = path; | |
}); | |
return <Component {...pageProps} />; | |
} | |
export default MyApp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment