Skip to content

Commit

Permalink
Merge pull request #87 from LikeLion-at-DGU/develop
Browse files Browse the repository at this point in the history
🚀 Deploy
  • Loading branch information
Chaem03 authored Oct 5, 2024
2 parents c808554 + 6ac7160 commit 0d89ded
Show file tree
Hide file tree
Showing 3 changed files with 222 additions and 105 deletions.
9 changes: 6 additions & 3 deletions src/apis/booth.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ export const getBoothList = async (
let params = [];

// 각 필터가 값이 있을 때만 쿼리 파라미터에 추가
if (day) params.push(`day=${day}`);
if (category) params.push(`category=${category}`);
if (location) params.push(`location=${location}`);

if (day !== undefined) params.push(`day=${day}`);
if (category !== undefined) params.push(`category=${category}`);
if (location !== undefined) params.push(`location=${location}`);

// is_night와 is_reservable은 boolean 값으로 처리 (undefined와 null 제외)
if (is_night !== null && is_night !== undefined)
params.push(`is_night=${is_night}`);
if (is_reservable !== null && is_reservable !== undefined)

params.push(`is_reservable=${is_reservable}`);

// 쿼리 파라미터가 있을 경우 URL에 추가
Expand Down
18 changes: 9 additions & 9 deletions src/boothdata/Boothdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const BoothData = [
filters: {
time: "낮",
type: "주점",
location: "팔정도"
}
location: "팔정도",
},
},
{
id: 2,
Expand All @@ -39,8 +39,8 @@ const BoothData = [
filters: {
time: "밤",
type: "주점",
location: "만해광장"
}
location: "만해광장",
},
},
{
id: 3,
Expand All @@ -58,8 +58,8 @@ const BoothData = [
filters: {
time: "낮",
type: "기타",
location: "팔정도"
}
location: "팔정도",
},
},
{
id: 4,
Expand All @@ -77,9 +77,9 @@ const BoothData = [
filters: {
time: "밤",
type: "기타",
location: "만해광장"
}
}
location: "만해광장",
},
},
];

export default BoothData;
Loading

0 comments on commit 0d89ded

Please sign in to comment.