Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/components/search/BookSearchResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,26 +104,36 @@ const ResultHeader = styled.div`
const Cover = styled.img`
width: 80px;
height: 107px;
flex-shrink: 0;
object-fit: cover;
`;

const BookInfo = styled.div`
display: flex;
flex-direction: column;
margin-left: 12px;
min-width: 0;
`;

const Title = styled.h3`
font-size: ${typography.fontSize.base};
font-weight: ${typography.fontWeight.semibold};
color: ${colors.white};
line-height: 20px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-word;
`;

const Subtitle = styled.span`
font-size: ${typography.fontSize.xs};
font-weight: ${typography.fontWeight.medium};
color: ${colors.grey[200]};
margin-top: 8px;
line-height: 20px;
`;

const EmptyWrapper = styled.div`
Expand Down
4 changes: 4 additions & 0 deletions src/pages/searchBook/SearchBook.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ export const FeedSection = styled.section`
margin-top: 20px;
`;

export const FeedPostContainer = styled.div`
min-height: 50vh;
`;

export const FeedTitle = styled.h2`
color: ${colors.white};
font-size: ${typography.fontSize.lg};
Expand Down
6 changes: 3 additions & 3 deletions src/pages/searchBook/SearchBook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
EmptyState,
EmptyTitle,
EmptySubText,
FeedPostContainer,
} from './SearchBook.styled';
import { useNavigate, useParams } from 'react-router-dom';
import leftArrow from '../../assets/common/leftArrow.svg';
Expand Down Expand Up @@ -298,11 +299,10 @@ const SearchBook = () => {
setSelectedFilter={filter => setSelectedFilter(filter as (typeof FILTER)[number])}
/>
</FilterContainer>

{isLoadingFeeds && feeds.length === 0 ? (
<LoadingBox>불러오는 중...</LoadingBox>
) : feeds.length > 0 ? (
<>
<FeedPostContainer>
{feeds.map((post, idx) => (
<div
key={post.feedId}
Expand All @@ -328,7 +328,7 @@ const SearchBook = () => {
/>
</div>
))}
</>
</FeedPostContainer>
) : (
<EmptyState>
<EmptyTitle>이 책으로 작성된 피드가 없어요.</EmptyTitle>
Expand Down