diff --git a/src/components/Common/LoadingSpinner/index.tsx b/src/components/Common/LoadingSpinner/index.tsx new file mode 100644 index 000000000..570de01a4 --- /dev/null +++ b/src/components/Common/LoadingSpinner/index.tsx @@ -0,0 +1,32 @@ +import React from 'react'; + +const LoadingSpinner: React.FC = () => { + return ( +
+ + + + + + + + + + +
+ ); +}; + +export default LoadingSpinner; diff --git a/src/components/MovieDetails/index.tsx b/src/components/MovieDetails/index.tsx index 3f9053de5..ee2dd525a 100644 --- a/src/components/MovieDetails/index.tsx +++ b/src/components/MovieDetails/index.tsx @@ -19,6 +19,7 @@ import Slider from '../Slider'; import TitleCard from '../TitleCard'; import PersonCard from '../PersonCard'; import { LanguageContext } from '../../context/LanguageContext'; +import LoadingSpinner from '../Common/LoadingSpinner'; const messages = defineMessages({ releasedate: 'Release Date', @@ -99,12 +100,13 @@ const MovieDetails: React.FC = ({ movie }) => { }; if (!data && !error) { - return
loading!
; + return ; } if (!data) { - return
Unknwon?
; + return
Broken?
; } + return (