diff --git a/kraken-app/kraken-app-portal/src/components/Header/index.tsx b/kraken-app/kraken-app-portal/src/components/Header/index.tsx index 9a31b137..6010b559 100644 --- a/kraken-app/kraken-app-portal/src/components/Header/index.tsx +++ b/kraken-app/kraken-app-portal/src/components/Header/index.tsx @@ -5,12 +5,10 @@ import { Dropdown, Flex, Tag, - Tooltip, } from "antd"; import styles from "./index.module.scss"; import Logo from "@/assets/logo.svg"; import { - CloseOutlined, EditTwoTone, LogoutOutlined, QuestionCircleOutlined, @@ -18,36 +16,15 @@ import { import { useTutorialStore } from "@/stores/tutorial.store"; import { useUser } from "@/hooks/user/useUser"; import { Text } from "../Text"; -import { Link, useNavigate } from "react-router-dom"; +import { Link, useLocation, useNavigate } from "react-router-dom"; import { UserAvatar } from "./UserAvatar"; import { ISystemInfo } from "@/utils/types/user.type"; import UpgradingIcon from '@/assets/icon/upgrading.svg' -const TooltipBody = (setTutorialCompleted: (value: boolean) => void) => ( -
- - Open the guide here. - setTutorialCompleted(false)} - /> - - - - -
-); - const Header = ({ info }: Readonly<{ info?: ISystemInfo }>) => { + const location = useLocation() const { currentUser } = useUser(); - const { tutorialCompleted, setTutorialCompleted, setOpenTutorial } = - useTutorialStore(); + const { toggleTutorial } = useTutorialStore(); const navigate = useNavigate(); const handleLogout = () => { @@ -113,20 +90,16 @@ const Header = ({ info }: Readonly<{ info?: ISystemInfo }>) => { Mapping template upgrading - + )} - - setOpenTutorial(true)} /> - + {/^\/api-mapping/.test(location.pathname) && ( + + )} { style={{ borderRadius: 4, width: "100%" }} title={ - + {get(item, "metadata.name", "")} -
+ {isHover && isApiInUse ? ( ) : ( - + {isApiInUse ? "In use" : "Not in use"} )} -
+