Xxx-av20432 High Quality -

);

loading && <p>Searching...</p>

);

// Search content app.get('/api/search', async (req, res) => const query, page = 1 = req.query; if (!query) return res.status(400).json( error: 'Query parameter required' ); try const response = await axios.get( $TMDB_BASE/search/multi?api_key=$API_KEY&query=$encodeURIComponent(query)&page=$page ); res.json(response.data.results); catch (error) res.status(500).json( error: error.message );

if (loading) return <div className="text-center p-10">Loading trending content...</div>; xxx-av20432

return ( <div className="container mx-auto p-4"> <form onSubmit=handleSearch className="mb-6"> <input type="text" value=query onChange=(e) => setQuery(e.target.value) placeholder="Search movies, TV shows, people..." className="w-full p-3 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500" /> <button type="submit" className="mt-2 bg-blue-600 text-white px-6 py-2 rounded-lg hover:bg-blue-700"> Search </button> </form>

export default Home; import React, useState from 'react'; import searchContent from '../services/api'; import ContentCard from '../components/ContentCard'; import useNavigate from 'react-router-dom'; const Search = () => const [query, setQuery] = useState(''); const [results, setResults] = useState([]); const [loading, setLoading] = useState(false); const navigate = useNavigate(); ); loading && &lt;p&gt;Searching

// Get details by ID app.get('/api/details/:type/:id', async (req, res) => const type, id = req.params; // type: 'movie' or 'tv' try const response = await axios.get( $TMDB_BASE/$type/$id?api_key=$API_KEY&append_to_response=videos,credits ); res.json(response.data); catch (error) res.status(500).json( error: error.message );




حجم الخط
+
16
-
تباعد السطور
+
2
-