Skip to content

Commit

Permalink
Feat: encodeURIComponent 사용
Browse files Browse the repository at this point in the history
  • Loading branch information
HyunJinNo committed Aug 30, 2024
1 parent 1a55e28 commit caf6e8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/informations/list/InformationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ async function getInformationList(
) {
const cookie = cookies().get("access_token");
const response = await fetch(
`${process.env.BACKEND_URL}/api/informations${tagName !== undefined ? `/tag/search` : ""}?page=${page}&parentCategoryId=${parentCategoryId}${childCategoryId > 0 ? `&childCategoryId=${childCategoryId}` : ""}${place !== undefined ? `&zoneCategoryId=${LOCATION_ID[place]}` : ""}${order !== undefined && order !== "latest" ? `&sort=${order}` : ""}${tagName !== undefined ? `&tagName=${tagName}` : ""}`,
`${process.env.BACKEND_URL}/api/informations${tagName !== undefined ? `/tag/search` : ""}?page=${page}&parentCategoryId=${parentCategoryId}${childCategoryId > 0 ? `&childCategoryId=${childCategoryId}` : ""}${place !== undefined ? `&zoneCategoryId=${LOCATION_ID[place]}` : ""}${order !== undefined && order !== "latest" ? `&sort=${order}` : ""}${tagName !== undefined ? `&tagName=${encodeURIComponent(tagName)}` : ""}`,
{
method: "GET",
headers: {
"Content-Type": "application/json",
Cookie: `${cookie?.name}=${cookie?.value}`,
},
next: { revalidate: 60, tags: ["getInformationList"] },
Expand Down

0 comments on commit caf6e8e

Please sign in to comment.