[Update/Perf] Config Page: Device Tab. Add threshold_component(dev).
Improve re-render, unnecessary, problem.
This commit is contained in:
@@ -1,39 +1,21 @@
|
||||
import clsx from "clsx";
|
||||
import styles from "./MainPage.module.scss";
|
||||
import { SidebarSection } from "./sidebar_section/SidebarSection";
|
||||
import { MainSection } from "./main_section/MainSection";
|
||||
import { useIsOpenedConfigPage } from "@store";
|
||||
|
||||
export const MainPage = () => {
|
||||
const { currentIsOpenedConfigPage } = useIsOpenedConfigPage();
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<SidebarSection />
|
||||
<MainSection />
|
||||
{/* <MainPageCover /> */}
|
||||
<div className={clsx(styles.page, styles.main_page, {
|
||||
[styles.show_config]: currentIsOpenedConfigPage,
|
||||
[styles.show_main]: !currentIsOpenedConfigPage
|
||||
})}>
|
||||
<div className={styles.container}>
|
||||
<SidebarSection />
|
||||
<MainSection />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// import { useTranslation } from "react-i18next";
|
||||
// import { useIsOpenedConfigPage } from "@store";
|
||||
// import { useWindow } from "@logics/useWindow";
|
||||
|
||||
// export const MainPageCover = () => {
|
||||
// const { t } = useTranslation();
|
||||
// const { currentIsOpenedConfigPage } = useIsOpenedConfigPage();
|
||||
// const { closeConfigPage } = useWindow();
|
||||
// if ( currentIsOpenedConfigPage === false) return null;
|
||||
|
||||
// const closeSettingsWindow = () => closeConfigPage();
|
||||
|
||||
// return (
|
||||
// <div className={styles.main_page_cover}>
|
||||
// <p className={styles.cover_message}>{t("main_page.cover_message")}</p>
|
||||
// <button
|
||||
// className={styles.close_settings_window_button}
|
||||
// onClick={closeSettingsWindow}
|
||||
// >
|
||||
// {t("main_page.close_settings_window")}
|
||||
// </button>
|
||||
// </div>
|
||||
// );
|
||||
// };
|
||||
};
|
||||
Reference in New Issue
Block a user