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,8 +1,8 @@
|
||||
import { useMemo } from "react";
|
||||
import { useParams } from "react-router-dom";
|
||||
import { useParams } from "react-router";
|
||||
import RevisionDetails from "../components/revision/RevisionDetails";
|
||||
import RevisionsList from "../components/revision/RevisionsList";
|
||||
import { ReleaseRevision } from "../data/types";
|
||||
import { Release, ReleaseRevision } from "../data/types";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import apiService from "../API/apiService";
|
||||
import Spinner from "../components/Spinner";
|
||||
@@ -15,18 +15,15 @@ function Revision() {
|
||||
|
||||
const selectedRevision = revision ? parseInt(revision, 10) : 0;
|
||||
|
||||
const { data: releaseRevisions, isLoading: isLoadingHistory } = useQuery<
|
||||
ReleaseRevision[]
|
||||
>({
|
||||
//eslint-ignore
|
||||
//@ts-ignore
|
||||
queryKey: ["releasesHistory", restParams],
|
||||
queryFn: apiService.getReleasesHistory,
|
||||
});
|
||||
const { data: releaseRevisions = [], isLoading: isLoadingHistory } = useQuery(
|
||||
{
|
||||
queryKey: ["releasesHistory", restParams],
|
||||
queryFn: apiService.getReleasesHistory,
|
||||
}
|
||||
);
|
||||
|
||||
const latestRevision = useMemo(
|
||||
() =>
|
||||
Array.isArray(releaseRevisions) &&
|
||||
releaseRevisions.reduce((max, revisionData) => {
|
||||
return Math.max(max, revisionData.revision);
|
||||
}, Number.MIN_SAFE_INTEGER),
|
||||
@@ -40,7 +37,7 @@ function Revision() {
|
||||
|
||||
const selectedRelease = useMemo(() => {
|
||||
if (selectedRevision && releaseRevisions) {
|
||||
return (releaseRevisions as ReleaseRevision[]).find(
|
||||
return releaseRevisions.find(
|
||||
(r: ReleaseRevision) => r.revision === selectedRevision
|
||||
);
|
||||
}
|
||||
@@ -70,14 +67,10 @@ function Revision() {
|
||||
</div>
|
||||
) : selectedRelease ? (
|
||||
<RevisionDetails
|
||||
//@ts-ignore
|
||||
release={selectedRelease}
|
||||
installedRevision={
|
||||
//@ts-ignore
|
||||
releaseRevisions?.[0] as ReleaseRevision
|
||||
}
|
||||
release={selectedRelease as Release} // TODO fix it
|
||||
installedRevision={releaseRevisions?.[0]}
|
||||
isLatest={selectedRelease.revision === latestRevision}
|
||||
latestRevision={latestRevision.revision}
|
||||
latestRevision={latestRevision}
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
@@ -88,12 +81,12 @@ function Revision() {
|
||||
const RevisionSidebarSkeleton = () => {
|
||||
return (
|
||||
<>
|
||||
<div className="border rounded-md mx-5 p-2 gap-4 animate-pulse h-[74px] w-[88%] bg-gray-100" />
|
||||
<div className="border rounded-md mx-5 p-2 gap-4 animate-pulse h-[74px] w-[88%] bg-gray-100" />
|
||||
<div className="border rounded-md mx-5 p-2 gap-4 animate-pulse h-[74px] w-[88%] bg-gray-100" />
|
||||
<div className="border rounded-md mx-5 p-2 gap-4 animate-pulse h-[74px] w-[88%] bg-gray-100" />
|
||||
<div className="border rounded-md mx-5 p-2 gap-4 animate-pulse h-[74px] w-[88%] bg-gray-100" />
|
||||
<div className="border rounded-md mx-5 p-2 gap-4 animate-pulse h-[74px] w-[88%] bg-gray-100" />
|
||||
<div className="border border-gray-200 rounded-md mx-5 p-2 gap-4 animate-pulse h-[74px] w-[88%] bg-gray-100" />
|
||||
<div className="border border-gray-200 rounded-md mx-5 p-2 gap-4 animate-pulse h-[74px] w-[88%] bg-gray-100" />
|
||||
<div className="border border-gray-200 rounded-md mx-5 p-2 gap-4 animate-pulse h-[74px] w-[88%] bg-gray-100" />
|
||||
<div className="border border-gray-200 rounded-md mx-5 p-2 gap-4 animate-pulse h-[74px] w-[88%] bg-gray-100" />
|
||||
<div className="border border-gray-200 rounded-md mx-5 p-2 gap-4 animate-pulse h-[74px] w-[88%] bg-gray-100" />
|
||||
<div className="border border-gray-200 rounded-md mx-5 p-2 gap-4 animate-pulse h-[74px] w-[88%] bg-gray-100" />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user