mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Enabled recommended-requiring-type-checking as result type fixes provided (#632)
* Enabled recommended-requiring-type-checking * from .cjs to .js * check * check * check * check * A lot of types aligned and refactored * More strict types * Improvement * Improvements * Improvements * Fixed routs * Fixed import types
This commit is contained in:
@@ -4,8 +4,10 @@ import Installed from "./pages/Installed";
|
||||
import RepositoryPage from "./pages/Repository";
|
||||
import Revision from "./pages/Revision";
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import type { FC } from "react";
|
||||
import { useState } from "react";
|
||||
import { ErrorAlert, ErrorModalContext } from "./context/ErrorModalContext";
|
||||
import type { ErrorAlert } from "./context/ErrorModalContext";
|
||||
import { ErrorModalContext } from "./context/ErrorModalContext";
|
||||
import GlobalErrorModal from "./components/modal/GlobalErrorModal";
|
||||
import { AppContextProvider } from "./context/AppContext";
|
||||
import apiService from "./API/apiService";
|
||||
@@ -31,7 +33,7 @@ const PageLayout = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const SyncContext: React.FC = () => {
|
||||
const SyncContext: FC = () => {
|
||||
const { context } = useParams();
|
||||
if (context) {
|
||||
apiService.setCluster(decodeURIComponent(context));
|
||||
@@ -52,31 +54,29 @@ export default function App() {
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<HashRouter>
|
||||
<Routes>
|
||||
<Route path="docs/" element={<DocsPage />} />
|
||||
<Route path="docs/*" element={<DocsPage />} />
|
||||
<Route path="*" element={<PageLayout />}>
|
||||
<Route path=":context?/*" element={<SyncContext />}>
|
||||
<Route
|
||||
path="repository/:selectedRepo?/*"
|
||||
element={<RepositoryPage />}
|
||||
/>
|
||||
<Route path="installed/?" element={<Installed />} />
|
||||
<Route
|
||||
path=":namespace/:chart/installed/revision/:revision"
|
||||
element={<Revision />}
|
||||
/>
|
||||
<Route path="repository/" element={<RepositoryPage />} />
|
||||
<Route
|
||||
path="repository/:selectedRepo?"
|
||||
element={<RepositoryPage />}
|
||||
/>
|
||||
<Route path="*" element={<Installed />} />
|
||||
</Route>
|
||||
<Route path="*" element={<Installed />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
<GlobalErrorModal
|
||||
isOpen={!!shouldShowErrorModal}
|
||||
onClose={() => setShowErrorModal(undefined)}
|
||||
titleText={shouldShowErrorModal?.title || ""}
|
||||
contentText={shouldShowErrorModal?.msg || ""}
|
||||
/>
|
||||
</HashRouter>
|
||||
<GlobalErrorModal
|
||||
isOpen={!!shouldShowErrorModal}
|
||||
onClose={() => setShowErrorModal(undefined)}
|
||||
titleText={shouldShowErrorModal?.title || ""}
|
||||
contentText={shouldShowErrorModal?.msg || ""}
|
||||
/>
|
||||
</QueryClientProvider>
|
||||
</ErrorModalContext.Provider>
|
||||
</AppContextProvider>
|
||||
|
||||
Reference in New Issue
Block a user