mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-26 06:18:04 +00:00
Bump a lot of packages (#625)
* Bump react, luxon, swagger, uuid * Improved imports * Fixed vulnerabilities * Bump highlight.js and added eslint-plugin-react-hooks with fixes * Bump compare-versions, html-react-parser, react-intersection-observer, react-modern-drawer * Bump @tanstack/react-query, react-select * Added tsc:check script
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { useState } from "react";
|
||||
import Modal from "./Modal";
|
||||
import Spinner from "../Spinner";
|
||||
import useAlertError from "../../hooks/useAlertError";
|
||||
@@ -21,20 +21,21 @@ type AddRepositoryModalProps = {
|
||||
};
|
||||
|
||||
function AddRepositoryModal({ isOpen, onClose }: AddRepositoryModalProps) {
|
||||
const [formData, setFormData] = useState<FormKeys>({} as FormKeys);
|
||||
const {
|
||||
searchParamsObject: { repo_url, repo_name },
|
||||
} = useCustomSearchParams();
|
||||
const [formData, setFormData] = useState<FormKeys>({
|
||||
name: repo_name ?? "",
|
||||
url: repo_url ?? "",
|
||||
username: "",
|
||||
password: "",
|
||||
});
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const alertError = useAlertError();
|
||||
const { searchParamsObject } = useCustomSearchParams();
|
||||
const { repo_url, repo_name } = searchParamsObject;
|
||||
const { setSelectedRepo } = useAppContext();
|
||||
const navigate = useNavigate();
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
useEffect(() => {
|
||||
if (!repo_url || !repo_name) return;
|
||||
setFormData({ ...formData, name: repo_name, url: repo_url });
|
||||
}, [repo_url, repo_name, formData]);
|
||||
|
||||
const addRepository = () => {
|
||||
const body = new FormData();
|
||||
body.append("name", formData.name ?? "");
|
||||
|
||||
Reference in New Issue
Block a user