From 6c02a00aa3066abc64f458adf797eb74510496c5 Mon Sep 17 00:00:00 2001 From: XLor Date: Sat, 5 Oct 2024 18:02:25 +0800 Subject: [PATCH] chore: move search to layout --- apps/frontend/web/app/layouts/Layout.tsx | 3 +-- .../frontend/web/app/{components => layouts}/Search/Search.tsx | 0 apps/frontend/web/app/{components => layouts}/Search/cmdk.css | 0 apps/frontend/web/app/{components => layouts}/Search/index.ts | 0 apps/frontend/web/app/{components => layouts}/Search/utils.ts | 0 apps/frontend/web/app/layouts/Sidebar/sidebar.tsx | 3 ++- 6 files changed, 3 insertions(+), 3 deletions(-) rename apps/frontend/web/app/{components => layouts}/Search/Search.tsx (100%) rename apps/frontend/web/app/{components => layouts}/Search/cmdk.css (100%) rename apps/frontend/web/app/{components => layouts}/Search/index.ts (100%) rename apps/frontend/web/app/{components => layouts}/Search/utils.ts (100%) diff --git a/apps/frontend/web/app/layouts/Layout.tsx b/apps/frontend/web/app/layouts/Layout.tsx index 314c9a96..c64f443f 100644 --- a/apps/frontend/web/app/layouts/Layout.tsx +++ b/apps/frontend/web/app/layouts/Layout.tsx @@ -3,8 +3,7 @@ import { memo } from 'react'; import { NavLink } from '@remix-run/react'; import { useAtomValue } from 'jotai'; -import Search from '~/components/Search'; - +import Search from './Search'; import { Loading } from './Loading'; import { isOpenSidebar, Sidebar } from './Sidebar'; diff --git a/apps/frontend/web/app/components/Search/Search.tsx b/apps/frontend/web/app/layouts/Search/Search.tsx similarity index 100% rename from apps/frontend/web/app/components/Search/Search.tsx rename to apps/frontend/web/app/layouts/Search/Search.tsx diff --git a/apps/frontend/web/app/components/Search/cmdk.css b/apps/frontend/web/app/layouts/Search/cmdk.css similarity index 100% rename from apps/frontend/web/app/components/Search/cmdk.css rename to apps/frontend/web/app/layouts/Search/cmdk.css diff --git a/apps/frontend/web/app/components/Search/index.ts b/apps/frontend/web/app/layouts/Search/index.ts similarity index 100% rename from apps/frontend/web/app/components/Search/index.ts rename to apps/frontend/web/app/layouts/Search/index.ts diff --git a/apps/frontend/web/app/components/Search/utils.ts b/apps/frontend/web/app/layouts/Search/utils.ts similarity index 100% rename from apps/frontend/web/app/components/Search/utils.ts rename to apps/frontend/web/app/layouts/Search/utils.ts diff --git a/apps/frontend/web/app/layouts/Sidebar/sidebar.tsx b/apps/frontend/web/app/layouts/Sidebar/sidebar.tsx index 14a7991f..6f87bd73 100644 --- a/apps/frontend/web/app/layouts/Sidebar/sidebar.tsx +++ b/apps/frontend/web/app/layouts/Sidebar/sidebar.tsx @@ -10,7 +10,6 @@ import { APP_HOST } from '~build/env'; import { generateFeed } from '~/utils/feed'; import { getActivePageTab } from '~/utils/routes'; import { collectionsAtom, type Collection } from '~/states/collection'; -import { stringifySearch } from '~/components/Search/utils'; import { DropdownMenu, DropdownMenuContent, @@ -20,6 +19,8 @@ import { } from '~/components/ui/dropdown-menu'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '~/components/ui/tooltip'; +import { stringifySearch } from '../Search/utils'; + import './sidebar.css'; import { isOpenSidebar } from './atom'; import { toast } from 'sonner';