-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
111 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { css } from '@emotion/react' | ||
import { Link } from 'react-router-dom' | ||
import { calcRem, colors, flexCenter } from '../../styles/theme' | ||
|
||
const EmptySearch = () => { | ||
return ( | ||
<div css={searchContainer}> | ||
<h1>검색 결과가 없습니다.</h1> | ||
<div className="img">이미지</div> | ||
<Link to="/mylog/book_register">️✍️ 직접 기록하기 ✍</Link> | ||
</div> | ||
) | ||
} | ||
|
||
export default EmptySearch | ||
|
||
const searchContainer = css` | ||
${flexCenter} | ||
flex-direction: column; | ||
margin-top: ${calcRem(50)}; | ||
position: absolute; | ||
inset: 0; | ||
.img { | ||
width: ${calcRem(200)}; | ||
height: ${calcRem(200)}; | ||
background-color: #c9c9c9; | ||
} | ||
h1 { | ||
margin-bottom: 1rem; | ||
} | ||
a { | ||
margin-top: 3rem; | ||
color: ${colors.main1}; | ||
font-weight: 700; | ||
} | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { css } from '@emotion/react' | ||
import { body2, calcRem, colors, flexCenter } from '../../styles/theme' | ||
|
||
const MyBook = () => { | ||
return ( | ||
<div css={myBookBox}> | ||
<div> | ||
<img src="https://www.theyoungtimes.com/news/photo/202206/869_1682_3518.jpg" alt="책이미지" /> | ||
</div> | ||
<p>책제목</p> | ||
<span>지은이</span> | ||
</div> | ||
) | ||
} | ||
|
||
export default MyBook | ||
|
||
const myBookBox = css` | ||
border: 1px solid ${colors.boxStroke}; | ||
border-radius: 0.5rem; | ||
${flexCenter}; | ||
flex-direction: column; | ||
background-color: ${colors.boxFill}; | ||
width: ${calcRem(154)}; | ||
height: ${calcRem(172)}; | ||
img { | ||
max-width: ${calcRem(70)}; | ||
max-height: ${calcRem(88)}; | ||
} | ||
p { | ||
margin-top: ${calcRem(12)}; | ||
margin-bottom: ${calcRem(8)}; | ||
} | ||
span { | ||
${body2}; | ||
} | ||
` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { useSearchParams } from 'react-router-dom' | ||
import { AllLayout } from '../../components/Layouts' | ||
import EmptySearch from '../../components/mylog/EmptySearch' | ||
import SearchBar from '../../elements/SearchBar' | ||
import { useMyLogSearchQuery } from '../../hooks/useMyLogSearchQuery' | ||
|
||
const MyLogSearch = () => { | ||
const [searchParams] = useSearchParams() | ||
const keyword = searchParams.get('q') || '' | ||
const searchResult = useMyLogSearchQuery(keyword).data | ||
|
||
return ( | ||
<AllLayout> | ||
<SearchBar placeHolder="책 검색하기" /> | ||
{true ? <EmptySearch /> : <div></div>} | ||
</AllLayout> | ||
) | ||
} | ||
|
||
export default MyLogSearch |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters