|
@@ -1,13 +1,13 @@
|
|
"use client";
|
|
"use client";
|
|
import Footer, { FooterProps } from "@/components/Footer";
|
|
import Footer, { FooterProps } from "@/components/Footer";
|
|
import Header, { HeaderProps } from "@/components/Header";
|
|
import Header, { HeaderProps } from "@/components/Header";
|
|
-import Sidebar from "@/components/Layout/Sidebar";
|
|
|
|
import { FC, PropsWithChildren, useEffect, useRef, useState } from "react";
|
|
import { FC, PropsWithChildren, useEffect, useRef, useState } from "react";
|
|
import { Swiper, SwiperClass, SwiperSlide } from "swiper/react";
|
|
import { Swiper, SwiperClass, SwiperSlide } from "swiper/react";
|
|
import styles from "./style.module.scss";
|
|
import styles from "./style.module.scss";
|
|
type Props = FooterProps & HeaderProps;
|
|
type Props = FooterProps & HeaderProps;
|
|
const Layout: FC<PropsWithChildren<Props>> = (props) => {
|
|
const Layout: FC<PropsWithChildren<Props>> = (props) => {
|
|
- const { children } = props;
|
|
|
|
|
|
+ console.count("layout render");
|
|
|
|
+ const { children, ...other } = props;
|
|
|
|
|
|
const swiperRef = useRef<SwiperClass>();
|
|
const swiperRef = useRef<SwiperClass>();
|
|
const isOpen = useRef<boolean>(false);
|
|
const isOpen = useRef<boolean>(false);
|
|
@@ -52,14 +52,17 @@ const Layout: FC<PropsWithChildren<Props>> = (props) => {
|
|
}}
|
|
}}
|
|
allowTouchMove={false}
|
|
allowTouchMove={false}
|
|
>
|
|
>
|
|
- <SwiperSlide
|
|
|
|
- style={{ width: `${!mounted ? "0" : "70%"}`, overflow: "hidden" }}
|
|
|
|
- className={"mx-w-[2.2222rem] bg-[rgb(31,31,31)]"}
|
|
|
|
- >
|
|
|
|
- <section className="relative h-[100vh]">
|
|
|
|
- <Sidebar></Sidebar>
|
|
|
|
- </section>
|
|
|
|
- </SwiperSlide>
|
|
|
|
|
|
+ {/*<SwiperSlide*/}
|
|
|
|
+ {/* style={{*/}
|
|
|
|
+ {/* width: `${!mounted ? "0" : "70%"}`,*/}
|
|
|
|
+ {/* overflow: "hidden",*/}
|
|
|
|
+ {/* }}*/}
|
|
|
|
+ {/* className={"mx-w-[2.2222rem] bg-[rgb(31,31,31)]"}*/}
|
|
|
|
+ {/*>*/}
|
|
|
|
+ {/* <section className="relative h-[100vh]">*/}
|
|
|
|
+ {/* <Sidebar></Sidebar>*/}
|
|
|
|
+ {/* </section>*/}
|
|
|
|
+ {/*</SwiperSlide>*/}
|
|
|
|
|
|
<SwiperSlide style={{ width: "100%" }}>
|
|
<SwiperSlide style={{ width: "100%" }}>
|
|
<div className="relative h-[100vh]" ref={homeContainerRef}>
|
|
<div className="relative h-[100vh]" ref={homeContainerRef}>
|
|
@@ -72,11 +75,11 @@ const Layout: FC<PropsWithChildren<Props>> = (props) => {
|
|
<div className={styles.bar} style={{ width: "0.1389rem" }}></div>
|
|
<div className={styles.bar} style={{ width: "0.1389rem" }}></div>
|
|
<div className={styles.bar}></div>
|
|
<div className={styles.bar}></div>
|
|
</div>
|
|
</div>
|
|
- <Header {...props}></Header>
|
|
|
|
|
|
+ <Header {...other}></Header>
|
|
<main className={styles.main} id="maincontainer">
|
|
<main className={styles.main} id="maincontainer">
|
|
{children}
|
|
{children}
|
|
</main>
|
|
</main>
|
|
- <Footer {...props}></Footer>
|
|
|
|
|
|
+ <Footer></Footer>
|
|
</div>
|
|
</div>
|
|
</SwiperSlide>
|
|
</SwiperSlide>
|
|
</Swiper>
|
|
</Swiper>
|