Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
server/node_modules/
client/node_modules/
.env
server/.env
client/.env
Comment on lines +1 to +5

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gitignore에 .env와 node_modules 관련하여 설정을 잘 해주셨어요.

.env
node_modules

이렇게 작성을 해도 동일한 기능을 해서 참고용으로 적어드립니다.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ export default function Navbar() {
);
}

// src/components/Footer.jsx
export default function Footer() {
return (
<footer className="footer">
<div className="container">© 2025 Panda Market</div>
</footer>
);
}

export default function Navbar() {
return (
<nav style={{ borderBottom: '1px solid #eee', padding: '12px 0' }}>
Expand Down
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions client/panda-market/src/services/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// src/services/api.js
const BASE_URL = 'https://panda-market-api.vercel.app';

export async function fetchProducts({ page=1, pageSize=20, sortBy='createdAt', order='desc', q='' } = {}) {
const params = new URLSearchParams();
params.set('page', page);
params.set('pageSize', pageSize);
if (sortBy) params.set('sortBy', sortBy); // "favorite" or "createdAt"
if (order) params.set('order', order); // "asc" or "desc"
if (q) params.set('q', q); // 검색어

const res = await fetch(`${BASE_URL}/products?${params.toString()}`);
if (!res.ok) throw new Error('상품을 불러오지 못했습니다');
const data = await res.json();
// 보편적으로 { items, total, page, pageSize } 형태를 가정
return data;
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading