text: import "bootstrap/dist/css/bootstrap.css";
  import "../public/styles/global.scss";
  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) => {
  	const client = buildClient(appContext.ctx);
  	const { data } = await client.get("/api/users/currentuser");
  
  	let pageProps = {};
  	if (appContext.Component.getInitialProps) {
  		pageProps = await appContext.Component.getInitialProps(
  			appContext.ctx,
  			client,
  			data.currentuser
  		);
  	}
  
  	return {
  		pageProps,
  		currentUser: data.currentUser,
  	};
  };
  
  export default AppComponent;
  