Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Fix lint errors
Tuan Dang9e5b9cbdb5c9
diff --git a/frontend/src/components/v2/UpgradePlanModal/UpgradePlanModal.tsx b/frontend/src/components/v2/UpgradePlanModal/UpgradePlanModal.tsxindex e09d35920e..bf97b67503 100644--- a/frontend/src/components/v2/UpgradePlanModal/UpgradePlanModal.tsx+++ b/frontend/src/components/v2/UpgradePlanModal/UpgradePlanModal.tsx@@ -1,12 +1,11 @@-import Link from "next/link";-import { useSubscription } from "@app/context";-import { Button } from "@app/components/v2";-import { Modal, ModalClose, ModalContent } from "../Modal";-import { useOrganization } from "@app/context";+import { useOrganization, useSubscription } from "@app/context";import {useGetOrgTrialUrl} from "@app/hooks/api";+import { Button } from "../Button";+import { Modal, ModalContent } from "../Modal";+type Props = {isOpen?: boolean;onOpenChange?: (isOpen: boolean) => void;diff --git a/frontend/src/hooks/api/organization/index.ts b/frontend/src/hooks/api/organization/index.tsindex d523e1c04a..847fb4bb97 100644--- a/frontend/src/hooks/api/organization/index.ts+++ b/frontend/src/hooks/api/organization/index.ts@@ -12,7 +12,7 @@ export {useGetOrgPlanTable,useGetOrgPmtMethods,useGetOrgTaxIds,- useRenameOrg,useGetOrgTrialUrl,+ useRenameOrg,useUpdateOrgBillingDetails} from "./queries";diff --git a/frontend/src/hooks/api/organization/queries.tsx b/frontend/src/hooks/api/organization/queries.tsxindex 293ad70224..3bbb824120 100644--- a/frontend/src/hooks/api/organization/queries.tsx+++ b/frontend/src/hooks/api/organization/queries.tsx@@ -11,7 +11,6 @@ import {PmtMethod,ProductsTable,RenameOrgDTO,- GetOrgTrialUrlDTO,TaxID} from "./types";diff --git a/frontend/src/hooks/api/organization/types.ts b/frontend/src/hooks/api/organization/types.tsindex b2573400b7..a33a7f875c 100644--- a/frontend/src/hooks/api/organization/types.ts+++ b/frontend/src/hooks/api/organization/types.ts@@ -10,11 +10,6 @@ export type RenameOrgDTO = {newOrgName: string;};-export type GetOrgTrialUrlDTO = {- orgId: string;- success_url: string;-}-export type BillingDetails = {name: string;email: string;diff --git a/frontend/src/layouts/AppLayout/components/NavBar/NavBar.tsx b/frontend/src/layouts/AppLayout/components/NavBar/NavBar.tsxindex 52fa0ba5b4..7c313b0e91 100644--- a/frontend/src/layouts/AppLayout/components/NavBar/NavBar.tsx+++ b/frontend/src/layouts/AppLayout/components/NavBar/NavBar.tsx@@ -3,7 +3,6 @@import { Fragment, useMemo } from "react";import { useTranslation } from "react-i18next";import Image from "next/image";-import Link from "next/link";import { useRouter } from "next/router";import { faGithub, faSlack } from "@fortawesome/free-brands-svg-icons";import { faCircleQuestion } from "@fortawesome/free-regular-svg-icons";@@ -23,9 +22,8 @@ import {TFunction} from "i18next";import guidGenerator from "@app/components/utilities/randomId";import { useOrganization, useSubscription,useUser } from "@app/context";import {- useLogoutUser,- useGetOrgTrialUrl-} from "@app/hooks/api";+ useGetOrgTrialUrl,+ useLogoutUser} from "@app/hooks/api";const supportOptions = (t: TFunction) => [[@@ -70,7 +68,7 @@ export const Navbar = () => {const { subscription } = useSubscription();const { currentOrg, orgs } = useOrganization();- const { mutateAsync, isLoading } = useGetOrgTrialUrl();+ const { mutateAsync } = useGetOrgTrialUrl();const { user } = useUser();const logout = useLogoutUser();@@ -100,37 +98,6 @@ export const Navbar = () => {}};- function formatPlanSlug(slug: string) {- return slug- .replace(/(\b[a-z])/g, match => match.toUpperCase())- .replace(/-/g, " ");- }-- const calculateRemainingDays = (date: number) => {- const now = new Date();- const endDate = new Date(date * 1000);-- const differenceInTime = endDate.getTime() - now.getTime();- const differenceInDays = Math.ceil(differenceInTime / (1000 * 3600 * 24));-- return differenceInDays;- }-- const formatDate = (date: number) => {- const endDate = new Date(date * 1000);- const day: number = endDate.getDate();- const month: number = endDate.getMonth() + 1;- const year: number = endDate.getFullYear();-- const formattedDate: string = `${day}/${month}/${year}`;- const remainingDays: number = calculateRemainingDays(date);-- return {- formattedDate,- remainingDays- };- }-return (<div className="z-[70] border-b border-mineshaft-500 bg-mineshaft-900 text-white"><div className="flex w-full justify-between px-4">diff --git a/frontend/src/views/Settings/BillingSettingsPage/components/BillingCloudTab/PreviewSection.tsx b/frontend/src/views/Settings/BillingSettingsPage/components/BillingCloudTab/PreviewSection.tsxindex cccbfaf2e0..20791e0e68 100644--- a/frontend/src/views/Settings/BillingSettingsPage/components/BillingCloudTab/PreviewSection.tsx+++ b/frontend/src/views/Settings/BillingSettingsPage/components/BillingCloudTab/PreviewSection.tsx@@ -11,7 +11,7 @@ import { ManagePlansModal } from "./ManagePlansModal";export const PreviewSection = () => {const { currentOrg } = useOrganization();- const { subscription, isLoading: isSubscriptionLoading } = useSubscription();+ const { subscription } = useSubscription();const { data, isLoading } = useGetOrgPlanBillingInfo(currentOrg?._id ?? "");const getOrgTrialUrl = useGetOrgTrialUrl();const createCustomerPortalSession = useCreateCustomerPortalSession();