1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/src/components/pages/SearchPage.js
2021-06-09 09:27:10 -04:00

29 lines
775 B
JavaScript

import PropTypes from 'prop-types';
import React, { useState } from 'react';
import SearchFields from '../search/SearchFields';
import SearchResults from '../search/SearchResultsComponent';
const SearchPage = ({ serverId, parentId, collectionType }) => {
const [ query, setQuery ] = useState(null);
return (
<>
<SearchFields onSearch={setQuery} />
<SearchResults
serverId={serverId || ApiClient.serverId()}
parentId={parentId}
collectionType={collectionType}
query={query}
/>
</>
);
};
SearchPage.propTypes = {
serverId: PropTypes.string,
parentId: PropTypes.string,
collectionType: PropTypes.string
};
export default SearchPage;