mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Move search components and hooks to features
This commit is contained in:
parent
da0cf958d3
commit
a63e80ec46
9 changed files with 20 additions and 22 deletions
|
@ -14,7 +14,7 @@ import { getItemsApi } from '@jellyfin/sdk/lib/utils/api/items-api';
|
|||
import { getPersonsApi } from '@jellyfin/sdk/lib/utils/api/persons-api';
|
||||
import { getArtistsApi } from '@jellyfin/sdk/lib/utils/api/artists-api';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useApi } from '../useApi';
|
||||
import { useApi } from '../../../../../hooks/useApi';
|
||||
import type { CardOptions } from 'types/cardOptions';
|
||||
import { CardShape } from 'utils/card';
|
||||
|
|
@ -4,7 +4,7 @@ import { ItemSortBy } from '@jellyfin/sdk/lib/generated-client';
|
|||
import { BaseItemKind } from '@jellyfin/sdk/lib/generated-client/models/base-item-kind';
|
||||
import { getItemsApi } from '@jellyfin/sdk/lib/utils/api/items-api';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useApi } from '../useApi';
|
||||
import { useApi } from 'hooks/useApi';
|
||||
|
||||
const fetchGetItems = async (
|
||||
api?: Api,
|
|
@ -1,11 +1,11 @@
|
|||
import React, { type ChangeEvent, type FC, useCallback, useRef } from 'react';
|
||||
import AlphaPicker from '../alphaPicker/AlphaPickerComponent';
|
||||
import AlphaPicker from '../../../../../components/alphaPicker/AlphaPickerComponent';
|
||||
import Input from 'elements/emby-input/Input';
|
||||
import globalize from '../../lib/globalize';
|
||||
import layoutManager from '../layoutManager';
|
||||
import browser from '../../scripts/browser';
|
||||
import globalize from '../../../../../lib/globalize';
|
||||
import layoutManager from '../../../../../components/layoutManager';
|
||||
import browser from '../../../../../scripts/browser';
|
||||
import 'material-design-icons-iconfont';
|
||||
import '../../styles/flexstyles.scss';
|
||||
import 'styles/flexstyles.scss';
|
||||
import './searchfields.scss';
|
||||
|
||||
interface SearchFieldsProps {
|
|
@ -1,7 +1,7 @@
|
|||
import React, { type FC } from 'react';
|
||||
import { Section, useSearchItems } from 'hooks/searchHook';
|
||||
import globalize from '../../lib/globalize';
|
||||
import Loading from '../loading/LoadingComponent';
|
||||
import { Section, useSearchItems } from '../api/useSearchItems';
|
||||
import globalize from '../../../../../lib/globalize';
|
||||
import Loading from '../../../../../components/loading/LoadingComponent';
|
||||
import SearchResultsRow from './SearchResultsRow';
|
||||
import { CardShape } from 'utils/card';
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
import type { BaseItemDto } from '@jellyfin/sdk/lib/generated-client';
|
||||
import React, { type FC, useEffect, useRef } from 'react';
|
||||
|
||||
import cardBuilder from '../cardbuilder/cardBuilder';
|
||||
import cardBuilder from 'components/cardbuilder/cardBuilder';
|
||||
import type { CardOptions } from 'types/cardOptions';
|
||||
import '../../elements/emby-scroller/emby-scroller';
|
||||
import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import 'elements/emby-scroller/emby-scroller';
|
||||
import 'elements/emby-itemscontainer/emby-itemscontainer';
|
||||
|
||||
// There seems to be some compatibility issues here between
|
||||
// React and our legacy web components, so we need to inject
|
|
@ -1,12 +1,12 @@
|
|||
import React, { FunctionComponent } from 'react';
|
||||
|
||||
import Loading from 'components/loading/LoadingComponent';
|
||||
import { appRouter } from '../router/appRouter';
|
||||
import { useSearchSuggestions } from 'hooks/searchHook/useSearchSuggestions';
|
||||
import { appRouter } from '../../../../../components/router/appRouter';
|
||||
import { useSearchSuggestions } from '../api/useSearchSuggestions';
|
||||
import globalize from 'lib/globalize';
|
||||
import LinkButton from '../../elements/emby-button/LinkButton';
|
||||
import LinkButton from '../../../../../elements/emby-button/LinkButton';
|
||||
|
||||
import '../../elements/emby-button/emby-button';
|
||||
import '../../../../../elements/emby-button/emby-button';
|
||||
|
||||
type SearchSuggestionsProps = {
|
||||
parentId?: string | null;
|
|
@ -4,9 +4,9 @@ import { useDebounceValue } from 'usehooks-ts';
|
|||
import { usePrevious } from 'hooks/usePrevious';
|
||||
import globalize from 'lib/globalize';
|
||||
import Page from 'components/Page';
|
||||
import SearchFields from 'components/search/SearchFields';
|
||||
import SearchSuggestions from 'components/search/SearchSuggestions';
|
||||
import SearchResults from 'components/search/SearchResults';
|
||||
import SearchFields from 'apps/stable/features/search/components/SearchFields';
|
||||
import SearchSuggestions from 'apps/stable/features/search/components/SearchSuggestions';
|
||||
import SearchResults from 'apps/stable/features/search/components/SearchResults';
|
||||
|
||||
const COLLECTION_TYPE_PARAM = 'collectionType';
|
||||
const PARENT_ID_PARAM = 'parentId';
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
export * from './useSearchItems';
|
||||
export * from './useSearchSuggestions';
|
Loading…
Add table
Add a link
Reference in a new issue