Download AmazonPrime-ReactJS-Clone/src/App.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 2.26 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/AmazonPrime-ReactJS-Clone/src/App.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/AmazonPrime-ReactJS-Clone/src/App.js
-
curl -L -o App.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/AmazonPrime-ReactJS-Clone/src/App.js
2.26 kB
| import React from "react"; | |
| import "./App.css"; | |
| import Header from "./components/Header"; | |
| import Home from "./components/Home/index"; | |
| import { BrowserRouter as Router, Route, Switch } from "react-router-dom"; | |
| import AllContent from "./components/AllContent"; | |
| import Movie from "./components/Movie/index"; | |
| import requests from "./requests"; | |
| import tvrequests from "./tvRequests"; | |
| import homeRequests from "./homeRequests"; | |
| import TV from "./components/TV/index"; | |
| function App() { | |
| const api_key = "989a8027930013244e3c2af17088dcac"; | |
| return ( | |
| <Router> | |
| <div className="App"> | |
| <Header /> | |
| <br /> | |
| <br /> | |
| <br /> | |
| <br /> | |
| <br /> | |
| <div> | |
| <Switch> | |
| <Route | |
| exact | |
| path="/" | |
| render={() => ( | |
| <Home | |
| api_key={api_key} | |
| requests={homeRequests} | |
| slideShowUrl="https://api.themoviedb.org/3/trending/all/day" | |
| /> | |
| )} | |
| /> | |
| <Route | |
| exact | |
| path="/movies" | |
| render={() => ( | |
| <Home | |
| api_key={api_key} | |
| requests={requests} | |
| slideShowUrl={`https://api.themoviedb.org/3/movie/popular?api_key=989a8027930013244e3c2af17088dcac&language=en-US&page=1`} | |
| /> | |
| )} | |
| /> | |
| <Route | |
| exact | |
| path="/tvShows" | |
| render={() => ( | |
| <Home | |
| api_key={api_key} | |
| requests={tvrequests} | |
| slideShowUrl={`https://api.themoviedb.org/3/tv/popular?api_key=989a8027930013244e3c2af17088dcac&language=en-US&page=1`} | |
| /> | |
| )} | |
| /> | |
| <Route | |
| exact | |
| path="/content" | |
| render={() => <AllContent API_KEY={api_key} />} | |
| /> | |
| <Route | |
| exact | |
| path="/movie" | |
| render={() => <Movie api_key={api_key} />} | |
| /> | |
| <Route exact path="/tv" render={() => <TV api_key={api_key} />} /> | |
| </Switch> | |
| </div> | |
| </div> | |
| </Router> | |
| ); | |
| } | |
| export default App; | |