Skip to content

Instantly share code, notes, and snippets.

@Manntrix
Created April 1, 2022 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Manntrix/e76aa0b88e6626ee3b94230bd7f17c3a to your computer and use it in GitHub Desktop.
Save Manntrix/e76aa0b88e6626ee3b94230bd7f17c3a to your computer and use it in GitHub Desktop.
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