ig.rizaldy.club/pages/_app.js

41 lines
1015 B
JavaScript
Raw Normal View History

2024-01-31 00:25:25 +07:00
import "../styles/globals.css";
2024-01-31 03:26:54 +07:00
import Script from "next/script";
2024-01-31 00:25:25 +07:00
import { Fragment } from "react";
import Navbar from "../components/Navbar";
import Footer from "../components/Footer";
import config from "../config.json";
const Content = ({ children }) => (
<div className="flex items-center justify-between w-full my-5">
<div className="lg:w-7/12 mx-auto">{children}</div>
</div>
);
2024-01-31 03:32:24 +07:00
const App = ({ Component, pageProps }) => (
<Fragment>
<Navbar name={config.navbar.logotype} logo={config.navbar.logo} />
<Content>
<Component {...pageProps} />
</Content>
<Footer
repo={config.footer.repo}
links={config.footer.links}
license={config.footer.license}
commitID={process.env.COMMIT_SHORT_SHA || "HEAD"}
/>
2024-01-31 12:12:39 +07:00
{process.env.UMAMI_ENABLED ? (
<Script
strategy="beforeInteractive"
src={process.env.UMAMI_SCRIPT_URL}
data-website-id={process.env.UMAMI_WEBSITE_ID}
/>
) : null}
2024-01-31 03:32:24 +07:00
</Fragment>
);
2024-01-31 00:25:25 +07:00
export default App;