From 7a224111d08c3113eb0c07e5d219af0b6eba189a Mon Sep 17 00:00:00 2001 From: Maina Wycliffe Date: Fri, 25 Oct 2024 09:20:26 +0300 Subject: [PATCH] refactor: organize imports --- .../ConfigChangesFilters.tsx | 2 +- .../FilterBar/ConfigRelatedChangesFilters.tsx | 2 +- src/pages/playbooks/PlaybookRunsPage.tsx | 4 ++-- src/pages/playbooks/PlaybooksList.tsx | 21 +++++++++++-------- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/components/Configs/Changes/ConfigChangesFilters/ConfigChangesFilters.tsx b/src/components/Configs/Changes/ConfigChangesFilters/ConfigChangesFilters.tsx index d5b8f39af..40ae9977f 100644 --- a/src/components/Configs/Changes/ConfigChangesFilters/ConfigChangesFilters.tsx +++ b/src/components/Configs/Changes/ConfigChangesFilters/ConfigChangesFilters.tsx @@ -1,10 +1,10 @@ import FormikFilterForm from "@flanksource-ui/components/Forms/FormikFilterForm"; +import { useConfigChangesArbitraryFilters } from "@flanksource-ui/hooks/useConfigChangesArbitraryFilters"; import ClosableBadge from "@flanksource-ui/ui/Badge/ClosableBadge"; import clsx from "clsx"; import { useCallback, useMemo } from "react"; import { FaBan } from "react-icons/fa"; import { useSearchParams } from "react-router-dom"; -import { useConfigChangesArbitraryFilters } from "../../../../hooks/useConfigChangesArbitraryFilters"; import { paramsToReset } from "../ConfigChangeTable"; import { ChangesTypesDropdown } from "./ChangeTypesDropdown"; import { ConfigChangeSeverity } from "./ConfigChangeSeverity"; diff --git a/src/components/Configs/Changes/ConfigsRelatedChanges/FilterBar/ConfigRelatedChangesFilters.tsx b/src/components/Configs/Changes/ConfigsRelatedChanges/FilterBar/ConfigRelatedChangesFilters.tsx index 18f6d922d..5ba4bbe43 100644 --- a/src/components/Configs/Changes/ConfigsRelatedChanges/FilterBar/ConfigRelatedChangesFilters.tsx +++ b/src/components/Configs/Changes/ConfigsRelatedChanges/FilterBar/ConfigRelatedChangesFilters.tsx @@ -1,6 +1,6 @@ import FormikFilterForm from "@flanksource-ui/components/Forms/FormikFilterForm"; +import { useConfigChangesArbitraryFilters } from "@flanksource-ui/hooks/useConfigChangesArbitraryFilters"; import clsx from "clsx"; -import { useConfigChangesArbitraryFilters } from "../../../../../hooks/useConfigChangesArbitraryFilters"; import { ChangesTypesDropdown } from "../../ConfigChangesFilters/ChangeTypesDropdown"; import { ConfigChangeSeverity } from "../../ConfigChangesFilters/ConfigChangeSeverity"; import ConfigChangesDateRangeFilter from "../../ConfigChangesFilters/ConfigChangesDateRangeFIlter"; diff --git a/src/pages/playbooks/PlaybookRunsPage.tsx b/src/pages/playbooks/PlaybookRunsPage.tsx index a1116ca4c..11f26e5f2 100644 --- a/src/pages/playbooks/PlaybookRunsPage.tsx +++ b/src/pages/playbooks/PlaybookRunsPage.tsx @@ -1,3 +1,4 @@ +import { useGetPlaybookSpecsDetails } from "@flanksource-ui/api/query-hooks/playbooks"; import { getPlaybookRuns } from "@flanksource-ui/api/services/playbooks"; import PlaybookRunsFilterBar, { playbookRunsDefaultDateFilter @@ -12,6 +13,7 @@ import { BreadcrumbRoot } from "@flanksource-ui/ui/BreadcrumbNav"; import useReactTablePaginationState from "@flanksource-ui/ui/DataTable/Hooks/useReactTablePaginationState"; +import useReactTableSortState from "@flanksource-ui/ui/DataTable/Hooks/useReactTableSortState"; import useTimeRangeParams from "@flanksource-ui/ui/Dates/TimeRangePicker/useTimeRangeParams"; import { Head } from "@flanksource-ui/ui/Head"; import { SearchLayout } from "@flanksource-ui/ui/Layout/SearchLayout"; @@ -20,8 +22,6 @@ import { useQuery } from "@tanstack/react-query"; import { useState } from "react"; import { FaHome } from "react-icons/fa"; import { useSearchParams } from "react-router-dom"; -import { useGetPlaybookSpecsDetails } from "../../api/query-hooks/playbooks"; -import useReactTableSortState from "@flanksource-ui/ui/DataTable/Hooks/useReactTableSortState"; export default function PlaybookRunsPage() { const [isEditPlaybookFormOpen, setIsEditPlaybookFormOpen] = useState(false); diff --git a/src/pages/playbooks/PlaybooksList.tsx b/src/pages/playbooks/PlaybooksList.tsx index 3254df04c..695cf2d49 100644 --- a/src/pages/playbooks/PlaybooksList.tsx +++ b/src/pages/playbooks/PlaybooksList.tsx @@ -1,17 +1,20 @@ +import { useGetAllPlaybookSpecs } from "@flanksource-ui/api/query-hooks/playbooks"; +import ErrorPage from "@flanksource-ui/components/Errors/ErrorPage"; import { AuthorizationAccessCheck } from "@flanksource-ui/components/Permissions/AuthorizationAccessCheck"; +import { playbookRunsPageTabs } from "@flanksource-ui/components/Playbooks/Runs/PlaybookRunsPageTabs"; +import PlaybookSpecsForm from "@flanksource-ui/components/Playbooks/Settings/PlaybookSpecsForm"; +import PlaybookSpecsList from "@flanksource-ui/components/Playbooks/Settings/PlaybookSpecsList"; import { tables } from "@flanksource-ui/context/UserAccessContext/permissions"; +import { + BreadcrumbNav, + BreadcrumbRoot +} from "@flanksource-ui/ui/BreadcrumbNav"; +import { Head } from "@flanksource-ui/ui/Head"; +import { SearchLayout } from "@flanksource-ui/ui/Layout/SearchLayout"; +import TabbedLinks from "@flanksource-ui/ui/Tabs/TabbedLinks"; import { useState } from "react"; import { AiFillPlusCircle } from "react-icons/ai"; import { FaHome } from "react-icons/fa"; -import { useGetAllPlaybookSpecs } from "../../api/query-hooks/playbooks"; -import ErrorPage from "../../components/Errors/ErrorPage"; -import { playbookRunsPageTabs } from "../../components/Playbooks/Runs/PlaybookRunsPageTabs"; -import PlaybookSpecsForm from "../../components/Playbooks/Settings/PlaybookSpecsForm"; -import PlaybookSpecsList from "../../components/Playbooks/Settings/PlaybookSpecsList"; -import { BreadcrumbNav, BreadcrumbRoot } from "../../ui/BreadcrumbNav"; -import { Head } from "../../ui/Head"; -import { SearchLayout } from "../../ui/Layout/SearchLayout"; -import TabbedLinks from "../../ui/Tabs/TabbedLinks"; export function PlaybooksListPage() { const [isOpen, setIsOpen] = useState(false);