<gh_stars>0
import React from "react";
import { useUser } from "@auth0/nextjs-auth0";

import Header from "../components/header/header";
import Hero from "../components/hero/hero";
import InfoSection from "../components/info-section/info-section";
import ExpertList from "../components/expert/expertList";
import TopicList from "../components/topic/topicList";
import Login from "../components/login/login";
import Footer from "../components/footer/footer";

function Index() {
  const { user, error, isLoading } = useUser();
  if (user) {
    return (
      <>
        <Header />
        <Hero variant="home" />
        <InfoSection variant="home" />
        <TopicList variant="home" />
        <ExpertList variant="home" />
        <Footer />
      </>
    );
  } else {
    return <Login />;
  }
}
export default Index;
