Skip to content

Commit

Permalink
Merge pull request #115 from official-Trippy/feature/#107
Browse files Browse the repository at this point in the history
Feature/#107
  • Loading branch information
YunHwanCho authored Sep 9, 2024
2 parents 0559c96 + 9c356f6 commit 6ec3cdc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
9 changes: 5 additions & 4 deletions src/app/search/[keyword]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import Keywords from "@/components/search/Keywords";
import PopularSearches from "@/components/search/popularSearches";
import axios from "axios";
import { useRouter } from "next/navigation";
import SortingBar from "@/components/search/\bsortingBar";
import PostAllCard from "@/components/search/\bpostAllCard";
import SortingBar from "@/components/search/sortingBar";
import PostAllCard from "@/components/search/postAllCard";
import getBoard from "@/services/board/get/getBoard";
import { useQuery } from "react-query";

Expand Down Expand Up @@ -114,6 +114,7 @@ const SearchPage = () => {
queryKey: ["boardData"],
queryFn: () => getBoard(PAGE_SIZE, pages),
});

console.log();

console.log(boardData);
Expand All @@ -122,7 +123,7 @@ const SearchPage = () => {
return (
<div className="w-full min-h-screen bg-white">
<Header />
<div className="w-[80%] mx-auto mt-8 px-10">
<div className="mx-auto mt-8 px-10 w-[66%] mx-auto">
<h1 className="text-4xl font-semibold mb-6">
<span className="text-[#FB3463]">{RealKeyword}</span>에 대한
<span className="text-[#FB3463]"> {count}</span>건의 검색 결과입니다.
Expand All @@ -144,7 +145,7 @@ const SearchPage = () => {
posts={posts}
selectedPostType={selectedPostType}
/>
<div className="flexflex mt-8">
<div className="flexflex mt-8 ml-[25px]">
<div className="flex-none w-[300px] ml-8">
<Keywords />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/search/Keywords.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Keywords: React.FC = () => {
{sampleKeywords.map((keyword, index) => (
<span
key={index}
className="bg-gray-200 text-gray-800 px-4 py-2 rounded-full text-sm"
className="bg-gray-200 text-gray-800 px-4 py-2 rounded-full text-m"
>
{keyword}
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const PostAllCard: React.FC<PostCardProps> = ({
? `/board/${postDetails?.id}`
: selectedPostType === "OOTD"
? `/ootd/${postDetails?.id}`
: `/profile/${postDetails?.id}`; // NICKNAME일 경우 프로필로 연결
: `/user/${member?.nickName}`;

return (
<Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const SortingBar: React.FC<SortingBarProps> = ({
{ label: "게시글", value: "POST" },
{ label: "OOTD", value: "OOTD" },
{ label: "사용자 닉네임", value: "NICKNAME" },
{ label: "블로그 이름", value: "BLOGNAME" },
];

const sortOrders = [
Expand All @@ -27,7 +28,7 @@ const SortingBar: React.FC<SortingBarProps> = ({
];

return (
<div className="flex justify-between items-center mb-4 mr-[520px] mb-[50px] mt-[30px]">
<div className="flex justify-between items-center mb-4 mr-[0px] mb-[50px] mt-[30px] w-[789px]">
<div className="flex space-x-4">
{postTypes.map((type) => (
<button
Expand Down
4 changes: 2 additions & 2 deletions src/services/follow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useFollowingStore } from "@/store/useFollowingStore";
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL;
let accessToken = "";

export async function showFollows(memberId: string) {
export async function showFollows(memberId: string, accessToken: any) {
try {
const response = await axios.get(
`${backendUrl}/api/member/follower?memberId=${memberId}`,
Expand All @@ -22,7 +22,7 @@ export async function showFollows(memberId: string) {
}
}

export async function showFollowings(memberId: string) {
export async function showFollowings(memberId: string, accessToken: any) {
try {
const response = await axios.get(
`${backendUrl}/api/member/following?memberId=${memberId}`,
Expand Down

0 comments on commit 6ec3cdc

Please sign in to comment.