-
Notifications
You must be signed in to change notification settings - Fork 0
/
Originals.js
79 lines (63 loc) · 1.85 KB
/
Originals.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import styled from "styled-components";
import { Link } from 'react-router-dom';
import { useSelector } from "react-redux";
import { selectOriginal } from "../features/movie/movieSlice";
const Originals = (props) => {
const movies = useSelector(selectOriginal);
return (
<Container>
<h4> Originals </h4>
<Content>
{movies &&
movies.map((movie, key) => (
<Wrap key={key}>
{movie.id}
<Link to={`/detail/` + movie.id}>
<img src={movie.cardImg} alt={movie.title} />
</Link>
</Wrap>
))}
</Content>
</Container>
)
}
const Container = styled.div`
padding: 0 0 26px;
`
const Content = styled.div`
display: grid;
grid-gap: 25px;
gap: 25px;
grid-template-columns: repeat(4, minmax(0, 1fr));
@media (max-width: 768px ) {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
`
const Wrap = styled.div`
padding-top: 56.25%;
border-radius: 10px;
box-shadow: rgb(0 0 0 / 69%) 0px 26px 30px -10px, rgb(0 0 0 / 73%) 0px 16px 10px -10px;
cursor: pointer;
overflow: hidden;
position: relative;
transition: all 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0s;
border: 3px solid rgba(249, 249, 249, 0.1);
img {
inset: 0px;
display: block;
height: 100%;
object-fit: cover;
opacity: 1;
position: absolute;
transition: opacity 500ms ease-in-out 0s;
width: 100%;
z-index: 1;
top: 0;
}
&:hover {
box-shadow: rgb(0 0 0 / 80%) 0px 40px 58px -16px, rgb(0 0 0 / 73%) 0px 30px 22px -10px;
transform: scale(1.05);
border-color: rgba(249, 249, 249, 0.8)
}
`
export default Originals;