From 983f1c25f9fc19c5bde23c0aadae329ee584b64e Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Thu, 18 Apr 2024 18:41:16 +0200 Subject: [PATCH] refactor(webui): simplify form components --- webui/src/app/(atlas)/[entry]/folders/[path].tsx | 6 +++--- webui/src/app/(atlas)/[entry]/index.tsx | 6 +++--- webui/src/app/(atlas)/[entry]/modules/[path].tsx | 4 ++-- .../{forms/EntrySelect.tsx => BundleSelectForm.tsx} | 2 +- .../{forms/ModuleFilter.tsx => ModuleFilterForm.tsx} | 0 5 files changed, 9 insertions(+), 9 deletions(-) rename webui/src/components/{forms/EntrySelect.tsx => BundleSelectForm.tsx} (98%) rename webui/src/components/{forms/ModuleFilter.tsx => ModuleFilterForm.tsx} (100%) diff --git a/webui/src/app/(atlas)/[entry]/folders/[path].tsx b/webui/src/app/(atlas)/[entry]/folders/[path].tsx index 4fa74c2..dd303f7 100644 --- a/webui/src/app/(atlas)/[entry]/folders/[path].tsx +++ b/webui/src/app/(atlas)/[entry]/folders/[path].tsx @@ -5,9 +5,9 @@ import { useMemo } from 'react'; import type { ModuleGraphResponse } from '~/app/--/entries/[entry]/modules/graph+api'; import { BreadcrumbLinks } from '~/components/BreadcrumbLinks'; import { BundleGraph } from '~/components/BundleGraph'; +import { BundleSelectForm } from '~/components/BundleSelectForm'; +import { ModuleFiltersForm } from '~/components/ModuleFilterForm'; import { StateInfo } from '~/components/StateInfo'; -import { EntrySelectForm } from '~/components/forms/EntrySelect'; -import { ModuleFiltersForm } from '~/components/forms/ModuleFilter'; import { EntryDeltaToast, useEntry } from '~/providers/entries'; import { Layout, LayoutHeader, LayoutNavigation, LayoutTitle } from '~/ui/Layout'; import { Tag } from '~/ui/Tag'; @@ -27,7 +27,7 @@ export default function FolderPage() { return ( - + diff --git a/webui/src/app/(atlas)/[entry]/index.tsx b/webui/src/app/(atlas)/[entry]/index.tsx index cfc894f..e7a50c7 100644 --- a/webui/src/app/(atlas)/[entry]/index.tsx +++ b/webui/src/app/(atlas)/[entry]/index.tsx @@ -2,9 +2,9 @@ import { keepPreviousData, useQuery } from '@tanstack/react-query'; import type { ModuleGraphResponse } from '~/app/--/entries/[entry]/modules/graph+api'; import { BundleGraph } from '~/components/BundleGraph'; +import { BundleSelectForm } from '~/components/BundleSelectForm'; +import { ModuleFiltersForm } from '~/components/ModuleFilterForm'; import { StateInfo } from '~/components/StateInfo'; -import { EntrySelectForm } from '~/components/forms/EntrySelect'; -import { ModuleFiltersForm } from '~/components/forms/ModuleFilter'; import { EntryDeltaToast, useEntry } from '~/providers/entries'; import { Layout, LayoutHeader, LayoutNavigation, LayoutTitle } from '~/ui/Layout'; import { Spinner } from '~/ui/Spinner'; @@ -22,7 +22,7 @@ export default function BundlePage() { return ( - + diff --git a/webui/src/app/(atlas)/[entry]/modules/[path].tsx b/webui/src/app/(atlas)/[entry]/modules/[path].tsx index 0029db3..cdab098 100644 --- a/webui/src/app/(atlas)/[entry]/modules/[path].tsx +++ b/webui/src/app/(atlas)/[entry]/modules/[path].tsx @@ -3,9 +3,9 @@ import { Link, useLocalSearchParams } from 'expo-router'; import { useMemo } from 'react'; import { BreadcrumbLinks } from '~/components/BreadcrumbLinks'; +import { BundleSelectForm } from '~/components/BundleSelectForm'; import { ModuleCode } from '~/components/ModuleCode'; import { StateInfo } from '~/components/StateInfo'; -import { EntrySelectForm } from '~/components/forms/EntrySelect'; import { EntryDeltaToast, useEntry } from '~/providers/entries'; import { Layout, LayoutHeader, LayoutNavigation, LayoutTitle } from '~/ui/Layout'; import { Skeleton } from '~/ui/Skeleton'; @@ -23,7 +23,7 @@ export default function ModulePage() { return ( - + diff --git a/webui/src/components/forms/EntrySelect.tsx b/webui/src/components/BundleSelectForm.tsx similarity index 98% rename from webui/src/components/forms/EntrySelect.tsx rename to webui/src/components/BundleSelectForm.tsx index e9445ad..744c187 100644 --- a/webui/src/components/forms/EntrySelect.tsx +++ b/webui/src/components/BundleSelectForm.tsx @@ -11,7 +11,7 @@ import { Button } from '~/ui/Button'; import { Tag } from '~/ui/Tag'; import { relativeEntryPath } from '~/utils/entry'; -export function EntrySelectForm() { +export function BundleSelectForm() { const router = useRouter(); const { entry, entries } = useEntry(); diff --git a/webui/src/components/forms/ModuleFilter.tsx b/webui/src/components/ModuleFilterForm.tsx similarity index 100% rename from webui/src/components/forms/ModuleFilter.tsx rename to webui/src/components/ModuleFilterForm.tsx