Skip to content

Commit c885cb5

Browse files
authored
Merge pull request #199 from Gachon-Univ-Creative-Code-Innovation/fix/move_button
카테고리 페이지에서 정렬버튼 검색박스 내부로 위치 변경
2 parents cf651fb + 41c51fc commit c885cb5

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

src/components/SortButton/SortButton.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
justify-content: center;
88
gap: 10px;
99
padding: 12px 20px;
10-
border: 2px solid #1d1652;
10+
border: none;
1111
border-radius: 10px;
1212
box-sizing: border-box;
1313
cursor: pointer;

src/screens/Community/Community.css

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
width: 100%;
3535
max-width: 800px;
3636
margin: 40px auto;
37+
overflow: visible;
3738
}
3839

3940
.community-keyword-box {
@@ -49,10 +50,18 @@
4950
position: relative;
5051
box-shadow: 0 4px 20px rgba(29, 22, 82, 0.08), inset 0 0 0 2px #e8f2ff;
5152
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
52-
overflow: hidden;
53+
overflow: visible;
5354
max-width: 500px;
5455
}
5556

57+
.community-keyword-box > :first-child {
58+
padding: 0;
59+
margin: 0;
60+
align-self: stretch;
61+
display: flex;
62+
align-items: center;
63+
}
64+
5665
.community-keyword-box:focus-within {
5766
box-shadow: 0 4px 20px rgba(29, 22, 82, 0.08), inset 0 0 0 2px #1d1652;
5867
}
@@ -106,9 +115,9 @@
106115

107116
.community-input {
108117
flex: 1;
109-
padding: 18px 24px;
118+
padding: 18px 16px;
110119
border: none;
111-
border-radius: 16px 0 0 16px;
120+
border-radius: 0;
112121
font-size: 16px;
113122
font-family: 'GmarketSans', sans-serif;
114123
font-weight: 400;

src/screens/Community/Community.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const Community = () => {
5252
setSearchResults(res.data.postList);
5353
setSearchPage(res.data.pageNumber);
5454
setSearchTotalPages(res.data.totalPages);
55-
} catch (err) {
55+
} catch {
5656
setSearchResults([]);
5757
}
5858
};
@@ -67,6 +67,7 @@ export const Community = () => {
6767
{/* 검색창 + 모집 버튼 */}
6868
<div className="community-frame-keyword">
6969
<div className="community-keyword-box">
70+
<SortButton onChange={setSelectedSort} />
7071
<input
7172
type="text"
7273
className="community-input"
@@ -100,9 +101,7 @@ export const Community = () => {
100101
onTabChange={setSelectedCategory}
101102
/>
102103

103-
<div className="community-frame-sort">
104-
<SortButton onChange={setSelectedSort} />
105-
</div>
104+
106105

107106
{/* 검색어가 있으면 검색 결과만, 없으면 기존 카테고리별 목록 */}
108107
{searchKeyword.trim() ? (

0 commit comments

Comments
 (0)