ResultPage.js
929 Bytes
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
import React from 'react';
import {useSelector} from 'react-redux';
import styled from 'styled-components';
const Container = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 100px;
`;
const Title = styled.div`
font-size: 5rem;
font-weight: bold;
`;
const Position = styled.div`
font-size: 4.5rem;
`;
const Description = styled.div`
margin-top: 4rem;
font-size: 1.4rem;
`;
function ResultPage(){
const data = useSelector(state=>state.result.data);
return(
<>
{data ? (
<Container>
<Title>{data.high}</Title>
<Position>{data.low}</Position>
<Description>{data.description}</Description>
</Container>)
: <div>로딩중</div>
}
</>
);
}
export default ResultPage;