mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-26 14:28:04 +00:00
Huge bump of versions + husky + fixed DropDown key issue and pointer (#628)
* Bump lint-staged * Check * Check * Added husky * Check * Check * Check * Check * Check * Check * Check * Check * Fix husky * Used * instead **/* in lint-staged * Bump tailwindcss and related * Added @tailwindcss/vite and removed postcss * Added lint into staged * Bump @babel/core and updated .prettierignore * Removed tailwind.config.cjs * Added ThemeInit * Added cursor-pointer to Help dropdown * Bump react-router * Removed @types/uuid and react-router-dom * Bump diff2html, prettier, @typescript-eslint/eslint-plugin, @typescript-eslint/parser * removed vite-plugin-html-config and @babel/core * removed "@eslint/eslintrc" and "@eslint/js" * Removed redundant link * Returned plugins and source to index.css * Set dark to false in tailwindcss * Fixed storybook * Fixed useGetLatestVersion with correct gcTime: 0 option * Added eslint-plugin-prettier * Removed spaces * ClustersList.tsx improved and type fixes for another files * Repository.tsx improved * Huge fix of types * Huge fix of types missed * Fixed type of SingleValue * Added cursor pointer
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { useLocation } from "react-router";
|
||||
import LogoHeader from "../assets/logo-header.svg";
|
||||
import DropDown from "../components/common/DropDown";
|
||||
import WatcherIcon from "../assets/k8s-watcher.svg";
|
||||
@@ -13,15 +13,22 @@ import { useGetApplicationStatus } from "../API/other";
|
||||
import LinkWithSearchParams from "../components/LinkWithSearchParams";
|
||||
import apiService from "../API/apiService";
|
||||
import { useAppContext } from "../context/AppContext";
|
||||
import { useEffect, useEffectEvent } from "react";
|
||||
|
||||
export default function Header() {
|
||||
const { clusterMode, setClusterMode } = useAppContext();
|
||||
const { data: statusData } = useGetApplicationStatus({
|
||||
onSuccess: (data) => {
|
||||
setClusterMode(data.ClusterMode);
|
||||
},
|
||||
const { data: statusData, isSuccess } = useGetApplicationStatus();
|
||||
|
||||
const onSuccess = useEffectEvent(() => {
|
||||
setClusterMode(!!statusData?.ClusterMode);
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (isSuccess && statusData) {
|
||||
onSuccess();
|
||||
}
|
||||
}, [isSuccess, statusData]);
|
||||
|
||||
const location = useLocation();
|
||||
|
||||
const openProjectPage = () => {
|
||||
@@ -46,7 +53,7 @@ export default function Header() {
|
||||
const getBtnStyle = (identifier: string) =>
|
||||
`text-md py-2.5 px-5 ${
|
||||
location.pathname.includes(`/${identifier}`)
|
||||
? " text-primary rounded-sm bg-header-install"
|
||||
? " text-primary rounded-xs bg-header-install"
|
||||
: ""
|
||||
}`;
|
||||
|
||||
@@ -129,7 +136,7 @@ export default function Header() {
|
||||
</div>
|
||||
</div>
|
||||
<div className="h-16 flex items-center text-sm ">
|
||||
<div className="flex p-1 gap-2 border bottom-gray-200 rounded min-w-max">
|
||||
<div className="flex p-1 gap-2 border bottom-gray-200 rounded-sm min-w-max">
|
||||
<img src={WatcherIcon} width={40} height={40} />
|
||||
<div className="flex flex-col">
|
||||
<a
|
||||
|
||||
Reference in New Issue
Block a user