text: import "bootstrap/dist/css/bootstrap.css";
  import buildClient from "../api/build-client";
  import Header from "../components/header";
  const AppComponent = ({ Component, pageProps, currentUser }) => {
    return (
      <div>
        <Header currentUser={currentUser} />
        <div className="container">
          <Component currentUser={currentUser} {...pageProps} />
        </div>
      </div>
    );
  };
  
  AppComponent.getInitialProps = async (appContext) => {
    // pages getInitProps is different than component's getInitProps
    const clients = buildClient(appContext.ctx.req);
    const { data } = await clients.auth.get("/api/users/currentuser");
    let pageProps = {};
    if (appContext.Component.getInitialProps) {
      pageProps = await appContext.Component.getInitialProps(
        appContext.ctx,
        clients,
        data.currentUser
      );
    }
  
    return {
      pageProps,
      ...data,
    };
  };
  
  export default AppComponent;
  