Download Netflix-Clone/src/Components/WithSpinner/WithSpinnerMovie.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 406 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Components/WithSpinner/WithSpinnerMovie.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Components/WithSpinner/WithSpinnerMovie.js
-
curl -L -o WithSpinnerMovie.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Components/WithSpinner/WithSpinnerMovie.js
406 Bytes
| import React from "react"; | |
| import Spinner from "../Spinner/Spinner"; | |
| const WithSpinnerMovie = WrappedComponent => | |
| ({ isMovieGridLoading,isMovieOverviewLoading, ...otherProps }) => { | |
| return isMovieGridLoading | |
| ? <Spinner /> | |
| : (isMovieOverviewLoading | |
| ? null | |
| : <WrappedComponent {...otherProps} />) | |
| }; | |
| export default WithSpinnerMovie; | |