+
+
+
+ {
+ setSortType(0);
+ setPostId(0);
+ setIsModalOpen(false);
+ setScrollLock(false);
+ }}
+ >
+ {sortType === 0 ? (
+ <>
+ 최근순
+
+ >
+ ) : (
+ 최근순
+ )}
+
+ {
+ setSortType(1);
+ setPostId(0);
+ setIsModalOpen(false);
+ setScrollLock(false);
+ }}
+ >
+ {sortType === 1 ? (
+ <>
+ 공감 많은 순
+
+ >
+ ) : (
+ 공감 많은 순
+ )}
+
+ {
+ setSortType(2);
+ setPostId(0);
+ setIsModalOpen(false);
+ setScrollLock(false);
+ }}
+ >
+ {sortType === 2 ? (
+ <>
+ 댓글 많은 순
+
+ >
+ ) : (
+ 댓글 많은 순
+ )}
+
+
+ );
+};
+const slideIn = keyframes`
+ from{
+ transform : translateY(100%);
+ }
+ to{
+ transform : translateY(0%);
+ }
+`;
+const slideOut = keyframes`
+ from{
+ transform : translateY(0%);
+ }
+ to{
+ transform : translateY(100%);
+ }
+`;
+const Wrapper = styled.div<{ visible: boolean }>`
+ @media (max-width: 767px) {
+ width: 100vw;
+ }
+ @media (min-width: 768px) {
+ width: 37.5rem;
+ }
+ position: fixed;
+ height: 22.7rem;
+ background-color: ${Grey6};
+ bottom: 0;
+ border-radius: 2rem 2rem 0 0;
+ box-shadow: 0px -4px 10px rgba(0, 0, 0, 0.1);
+ z-index: 2002;
+ animation: ${({ visible }) => (visible ? slideIn : slideOut)} 0.3s ease-in-out;
+
+ .bar-wrapper {
+ height: 4.5rem;
+ display: flex;
+ justify-content: center;
+ }
+ .row {
+ display: flex;
+ padding: 1rem 2rem 0 2rem;
+ height: 4.4rem;
+ justify-content: space-between;
+ cursor: pointer;
+ }
+`;
+const Bar = styled.div`
+ margin-top: 1.2rem;
+ width: 3.1rem;
+ height: 0.3rem;
+ background-color: ${Grey4};
+`;
diff --git a/src/components/Common/Divider2.tsx b/src/components/Common/Divider2.tsx
index 06f84e8b..70ed5297 100644
--- a/src/components/Common/Divider2.tsx
+++ b/src/components/Common/Divider2.tsx
@@ -53,8 +53,6 @@ const Wrapper = styled.nav`
display: flex;
justify-content: center;
border-bottom: 1px solid ${Grey6};
- position: sticky;
- top: 5.3rem;
background-color: white;
z-index: 999;
`;
diff --git a/src/pages/Buyer/BuyerSearchResult.tsx b/src/pages/Buyer/BuyerSearchResult.tsx
index efa3ef98..6a301c26 100644
--- a/src/pages/Buyer/BuyerSearchResult.tsx
+++ b/src/pages/Buyer/BuyerSearchResult.tsx
@@ -8,10 +8,9 @@ import { ReactComponent as Down } from 'assets/icons/icon-drop-down.svg';
import { SearchResults } from 'components/Buyer/BuyerSearchResult/SearchResults';
import { SortModal } from 'components/Buyer/Common/SortModal';
import { ChangeEvent, useLayoutEffect, useRef, useState } from 'react';
-import { sortList } from 'utils/constant';
+import { openSortList, sortList } from 'utils/constant';
import { useRecoilState, useSetRecoilState } from 'recoil';
import {
- isLoadingState,
isSortModalOpenState,
scrollLockState,
searchKeywordState,
@@ -19,13 +18,18 @@ import {
import Input from 'components/Common/Input';
import {
patchSearchWordsCounselorsResults,
- patchSearchWordsResults,
+ patchSearchWordsPostsResults,
} from 'api/patch';
import { SearchResultData } from 'utils/type';
import { ConverSortType } from 'utils/convertSortType';
import { ReactComponent as Empty } from 'assets/icons/graphic-noting.svg';
import { LoadingSpinner } from 'utils/LoadingSpinner';
import useIntersectionObserver from 'hooks/useIntersectionObserver';
+import Divider2 from 'components/Common/Divider2';
+import OpenConsultResults from 'components/Buyer/BuyerSearchResult/OpenConsultResults';
+import { openConsultApiObject } from './BuyerConsult';
+import { OpenConsultSortModal } from 'components/Buyer/Common/OpenConsultSortModal';
+import { ConverOpenSortType } from 'utils/convertOpenSortType';
export const BuyerSearchResult = () => {
const navigate = useNavigate();
//0 : 최신순 1:인기순 2: 별점순
@@ -43,8 +47,14 @@ export const BuyerSearchResult = () => {
const [input, setInput] = useState(initInput);
//결과저장
const [searchData, setSearchData] = useState