"use client";
import Footer from "@/components/Footer";
import { usePathname } from "@/i18n";
import { FC, PropsWithChildren, useEffect } from "react";
type Props = {};
const Layout: FC<PropsWithChildren<Props>> = (props) => {
    const { children } = props;

    // 获取分享id
    const pathname = usePathname();
    useEffect(() => {
        const [, shareId] = pathname.split("/");
        if (!shareId || shareId === "xxxxxx") return;
        sessionStorage.setItem("shareId", shareId);
    }, []);
    return (
        <>
            <main className={"main-footer"}>{children}</main>
            <Footer></Footer>
        </>
    );
};

export default Layout;
