Fallback.jsx
1.21 KB
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
import React, {useRef} from "react";
import styled from "styled-components";
import {Col, Row} from "react-bootstrap";
import Card from "components/Card/Card.jsx";
import {search_user, empty} from '../../assets/img'
const Wrapper = styled.div`
display: flex;
align-items: center;
justify-content: center;
color: #333333;
text-align: center;
`;
const EmptyImage = styled.img`
max-width: 70%;
height: auto !important;
`;
const SearchButton = (props) => {
const fallbackImg = Number(props.userId)<0
? empty
: search_user;
return (
<Card
content={
<Row>
<Col md={8} mdOffset={2} sm={8} smOffset={2} xs={8} xsOffset={2} style={{display: 'flex', justifyContent: 'center'}}>
<EmptyImage src={fallbackImg} alt="empty"/>
</Col>
<Col md={12} sm={12} xs={12}>
<Wrapper>
{
Number(props.userId)<0
? <div>검색 결과가 존재하지 않습니다.</div>
: <div>전화번호, 이메일, 사용자ID를 통해<br/>사용자를 검색해보세요!</div>
}
</Wrapper>
</Col>
</Row>
}
/>
);
};
export default SearchButton;