added usecase to all the builder and simulation fetched
This commit is contained in:
@@ -1,52 +1,53 @@
|
||||
import React from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { ToggleSidebarIcon } from "../../icons/HeaderIcons";
|
||||
import { LogoIcon } from "../../icons/Logo";
|
||||
import FileMenu from "../../ui/FileMenu";
|
||||
import { useToggleStore } from "../../../store/ui/useUIToggleStore";
|
||||
import { useSceneStore } from "../../../store/scene/useSceneStore";
|
||||
import useModuleStore from "../../../store/ui/useModuleStore";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import useRestStates from "../../../hooks/useResetStates";
|
||||
import FileMenu from "../../ui/FileMenu";
|
||||
|
||||
const Header: React.FC = () => {
|
||||
const { toggleUILeft, toggleUIRight, setToggleUI } = useToggleStore();
|
||||
const { activeModule } = useModuleStore();
|
||||
const navigate = useNavigate();
|
||||
const { resetStates } = useRestStates();
|
||||
const navigate = useNavigate();
|
||||
const { setLayoutType } = useSceneStore();
|
||||
const { toggleUILeft, toggleUIRight, setToggleUI } = useToggleStore();
|
||||
const { activeModule } = useModuleStore();
|
||||
const { resetStates } = useRestStates();
|
||||
|
||||
return (
|
||||
<div className="header-container">
|
||||
<div className="header-content">
|
||||
<button
|
||||
className="logo-container"
|
||||
onClick={() => {
|
||||
resetStates();
|
||||
navigate("/Dashboard")
|
||||
}}
|
||||
title="Back to Dashboard"
|
||||
>
|
||||
<LogoIcon />
|
||||
</button>
|
||||
<div className="header-title">
|
||||
<FileMenu />
|
||||
return (
|
||||
<div className="header-container">
|
||||
<div className="header-content">
|
||||
<button
|
||||
className="logo-container"
|
||||
onClick={() => {
|
||||
resetStates();
|
||||
navigate("/Dashboard");
|
||||
setLayoutType(null);
|
||||
}}
|
||||
title="Back to Dashboard"
|
||||
>
|
||||
<LogoIcon />
|
||||
</button>
|
||||
<div className="header-title">
|
||||
<FileMenu />
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
id="toggle-leftSidebar-ui-button"
|
||||
className={`toggle-sidebar-ui-button ${!toggleUILeft ? "active" : ""}`}
|
||||
onClick={() => {
|
||||
if (activeModule !== "market") {
|
||||
setToggleUI(!toggleUILeft, toggleUIRight);
|
||||
localStorage.setItem("navBarUiLeft", JSON.stringify(!toggleUILeft));
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div className="tooltip">{toggleUILeft ? "Hide" : "Show"} sidebar (ctrl + [)</div>
|
||||
<ToggleSidebarIcon />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
id="toggle-leftSidebar-ui-button"
|
||||
className={`toggle-sidebar-ui-button ${!toggleUILeft ? "active" : ""}`}
|
||||
onClick={() => {
|
||||
if (activeModule !== "market") {
|
||||
setToggleUI(!toggleUILeft, toggleUIRight);
|
||||
localStorage.setItem("navBarUiLeft", JSON.stringify(!toggleUILeft));
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div className="tooltip">
|
||||
{toggleUILeft ? "Hide" : "Show"} sidebar (ctrl + [)
|
||||
</div>
|
||||
<ToggleSidebarIcon />
|
||||
</button>
|
||||
</div >
|
||||
);
|
||||
);
|
||||
};
|
||||
|
||||
export default Header;
|
||||
|
||||
Reference in New Issue
Block a user