import useTranslation from "next-translate/useTranslation";
import Head from "next/head";
import { useState } from "react";
import { useSession } from "next-auth/react";
import { useRouter } from "next/router";
import { connect } from "react-redux";
import Breadcrumbs from "../../components/breadcrumbs";
import CookieBanner from "../../components/cookieBanner";
import Footer from "../../components/footer";
import Header from "../../components/header";
import Case from "../../components/representation";
import { wrapper } from "../../store/store";
import { loadRepresentationPage } from "../../lib/representation/pageLoaders";
import { setCurrentReference } from "../../store/currentView/action";
import NoSessionWarning from "../../components/nosession";
import ServiceBanner from "../../components/myportal/servicebanner";
import TimeOut from "../../components/timeout";
const RepresentationF = (props) => {
const { footerLinks, pages } = props;
let { t, lang } = useTranslation();
const router = useRouter();
const { locale } = router;
const { appealtypes } = router.query;
const [showQuestionnaireSection, setShowQuestionnaireSection] = useState(1);
// useEffect(() => {
// const updateAccountStore = async () => {
// const thisSession = await getSession();
// if (thisSession) {
// let loggedInUser = await getPortalLoginProxy(
// thisSession.user.email
// );
// dispatch(
// setAccountDetails(
// await getPersonalAccount(
// loggedInUser.value[0].contactid
// )
// )
// );
// dispatch(setContainerID(thisSession.user.id));
// dispatch(setLoggedInUserId(loggedInUser.value[0].contactid));
// //dispatch(setRepresentationSubmit(true));
// }
// };
// updateAccountStore();
// }, [dispatch]);
const { data: session, status } = useSession();
// if (status === "loading") {
// return