Skip to content

Commit 5e1b4cc

Browse files
committed
Deploy final typescript version
1 parent 7c49328 commit 5e1b4cc

20 files changed

+68
-41
lines changed

src/components/main/Movies/MovieOverview.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import imgBackground from '@app/assets/images/background.jpg';
2-
import imgPlaceholder from '@app/assets/images/img-placeholder.jpg';
31
import ImageLoader from '@app/components/common/Loader/ImageLoader';
42
import { getCSSVar, getYear } from '@app/helpers/helperFunctions';
53
import useFavorites from '@app/hooks/useFavorites';
@@ -89,7 +87,7 @@ const MovieOverview = () => {
8987
<img
9088
alt=""
9189
className="backdrop__image"
92-
src={movie?.backdrop_path ? `${tmdbBackdropPath + movie?.backdrop_path}` : imgBackground}
90+
src={movie?.backdrop_path ? `${tmdbBackdropPath + movie?.backdrop_path}` : '/background.jpg'}
9391
/>
9492
</div>
9593
)}
@@ -113,7 +111,7 @@ const MovieOverview = () => {
113111
<ImageLoader
114112
alt={movie.original_title || movie.original_name || movie.title}
115113
imgId={movie.id}
116-
src={movie.poster_path ? `${tmdbPosterPath + movie.poster_path}` : imgPlaceholder}
114+
src={movie.poster_path ? `${tmdbPosterPath + movie.poster_path}` : '/img-placeholder.jpg'}
117115
/>
118116
</LazyLoad>
119117
) : <Skeleton width={'100%'} height={'100%'} />}

src/components/main/People/PeopleList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface IProps {
1212
const PeopleList: React.FC<IProps> = ({ people, gridClass, templateCount }) => {
1313
return (
1414
<div className={gridClass}>
15-
{!people && templateCount != 0 ? new Array(templateCount).fill({}).map((item, index) => (
15+
{people.length === 0 && templateCount != 0 ? new Array(templateCount).fill({}).map((item, index) => (
1616
<PeopleCard
1717
key={`skeleton_people_${index}`}
1818
data={null}

src/components/main/People/PersonBiography.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import imgBackground from '@app/assets/images/background.jpg';
21
import ImageLoader from '@app/components/common/Loader/ImageLoader';
32
import { getCSSVar } from '@app/helpers/helperFunctions';
43
import { IRootState } from '@app/types/types';
@@ -8,6 +7,7 @@ import LazyLoad from 'react-lazy-load';
87
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
98
import { useSelector } from 'react-redux';
109
import Modal from 'react-responsive-modal';
10+
import 'react-responsive-modal/styles.css';
1111
import { useHistory } from 'react-router-dom';
1212

1313
const tmdbPosterPath = 'https://image.tmdb.org/t/p/w300_and_h450_face/';
@@ -40,7 +40,7 @@ const PersonBiography = () => {
4040
modal: 'Modal',
4141
modalContainer: 'ModalContainer',
4242
closeButton: 'ModalCloseButton',
43-
closeIcon: 'ModalCloseIcon'
43+
closeIcon: 'ModalCloseIcon',
4444
}}
4545
>
4646
<h2>{actor?.name}'s Biography</h2>
@@ -54,7 +54,7 @@ const PersonBiography = () => {
5454
<img
5555
alt=""
5656
className="backdrop__image"
57-
src={imgBackground}
57+
src="/background.jpg"
5858
/>
5959
)}
6060
</div>

src/components/main/Slider/MovieSliderItem.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import imgPlaceholder from '@app/assets/images/img-placeholder.jpg';
21
import ImageLoader from '@app/components/common/Loader/ImageLoader';
32
import { getCSSVar } from '@app/helpers/helperFunctions';
43
import { IMovieData } from '@app/types/types';
@@ -70,7 +69,7 @@ const MovieSliderItem: React.FC<{ movie: IMovieData | null }> = ({ movie }) => {
7069
<ImageLoader
7170
alt={movie.original_title || movie.original_name || movie.title}
7271
imgId={movie.id}
73-
src={movie.poster_path ? `${tmdbPosterPath + movie.poster_path}` : imgPlaceholder}
72+
src={movie.poster_path ? `${tmdbPosterPath + movie.poster_path}` : '/img-placeholder.jpg'}
7473
/>
7574
</LazyLoad>
7675
) : <Skeleton width={'100%'} height={'100%'} />}

src/styles/5 - COMPONENTS/_modal.scss

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,37 @@
1212
}
1313

1414
.Modal {
15-
background: var(--background-color);
16-
padding: 50px;
15+
background: var(--background-color) !important;
16+
padding: 50px !important;
1717
border-radius: 6px;
1818
position: relative;
19-
z-index: 9999;
20-
position: fixed;
19+
// z-index: 9999;
20+
// position: fixed;
2121
top: 0;
2222
left: 0;
2323
right: 0;
2424
bottom: 0;
2525
margin: auto;
26+
// width: 80rem;
2627

2728
@include mobile {
28-
padding: $l-size !important;
29+
padding: $l-size;
2930
}
3031
}
3132

3233
.ModalContainer {
33-
width: 90rem;
34+
// width: 199;
3435
}
3536

3637
.ModalCloseButton {
3738
position: absolute;
3839
top: 10px;
3940
right: 10px;
40-
color: #fff;
41-
background: #ff2e4f;
41+
background: #ff2e4f !important;
4242
}
4343

4444
.ModalCloseIcon {
45-
color: #fff;
45+
path {
46+
fill: #fff;
47+
}
4648
}

src/styles/5 - COMPONENTS/_slider.scss

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
top: 0;
2828
bottom: 0;
2929
margin: auto;
30-
width: 100%;
30+
width: 100%;
3131
height: 100%;
3232
border-radius: $border-radius;
33-
background: transparentize($dark-blue-0, .3);
33+
background: transparentize($dark-blue-0, 0.3);
3434
z-index: 1;
3535
}
3636

@@ -66,20 +66,20 @@
6666
width: 100%;
6767
padding: 0;
6868
padding-bottom: 5rem;
69-
// padding-left: $l-size;
70-
// padding-right: $l-size;
69+
// padding-left: $l-size;
70+
// padding-right: $l-size;
7171
}
7272

7373
.view__overview {
7474
color: $text-color;
75-
75+
7676
@include mobile {
7777
width: 100%;
7878
max-height: 80px;
7979
// white-space: nowrap;
8080
overflow: hidden;
8181
text-overflow: ellipsis;
82-
display:block;
82+
display: block;
8383
display: -webkit-box;
8484
-webkit-line-clamp: 3;
8585
-webkit-box-orient: vertical;
@@ -164,8 +164,6 @@
164164
height: 100%;
165165
}
166166

167-
168-
169167
.slick-arrow {
170168
z-index: 10;
171169
padding: 20px;
@@ -176,14 +174,20 @@
176174
}
177175

178176
&:before {
179-
font-size: 28px;
177+
font-size: 38px;
180178
position: absolute;
181179
left: 0;
182180
right: 0;
183181
top: 5px;
184182
}
185183
}
186184

185+
.slick-next,
186+
.slick-prev {
187+
width: 30px;
188+
height: 30px;
189+
}
190+
187191
.slick-next {
188192
right: 5% !important;
189193
}
@@ -198,7 +202,7 @@
198202
li {
199203
margin: 0;
200204
}
201-
205+
202206
button {
203207
&:before {
204208
width: 15px !important;
@@ -207,4 +211,4 @@
207211
color: #fff !important;
208212
}
209213
}
210-
}
214+
}

src/views/error/NetworkError.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const NetworkError: React.FC<RouteComponentProps> = ({ history }) => {
1212
<div className="error">
1313
<h1>Network Error</h1>
1414
<p>It looks like you don't have an intenet connection</p>
15+
<br />
1516
<button
1617
className="button--primary"
1718
onClick={returnHome}

src/views/error/PageNotFound.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const PageNotFound: React.FC<RouteComponentProps> = ({ history }) => {
1010

1111
return (
1212
<div className="error">
13-
<h1>The Page Your Requested Could Not Be Found</h1>
13+
<h1>The Page You Requested Could Not Be Found</h1>
14+
<br />
1415
<button
1516
className="button--primary"
1617
onClick={returnHome}

src/views/genre/SelectedGenre.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ const SelectedGenre: React.FC<RouteProps> = ({ match }) => {
2525
dispatch(fetchGenreCategory(match.params.id, currentPage));
2626
}, []);
2727

28+
useEffect(() => {
29+
window.scrollTo(0, 0);
30+
}, [currentGenre?.page]);
31+
2832
const handlePageChange = (page: number) => {
2933
if (currentGenre?.page !== page && !isLoading) {
3034
dispatch(fetchGenreCategory(match.params.id, page));

src/views/movie/DiscoverMovies.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ const DiscoverMovies = () => {
2121
if (!discoverMovies || didMount) {
2222
dispatch(fetchDiscoverMovies(currentPage));
2323
}
24-
}, [filter]);
24+
25+
window.scrollTo(0, 0);
26+
}, [filter, discoverMovies?.page]);
2527

2628
const handlePageChange = (page: number) => {
2729
if (discoverMovies?.page !== page) {

0 commit comments

Comments
 (0)