Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[정유석] sprint6 #99

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
df1cf04
add: 스프린트5 반응형 미디어 쿼리 적용
yousuk88 Oct 30, 2024
35d8d51
fix: 스프린트5 반응형 미디어 쿼리 수정
yousuk88 Oct 30, 2024
92f09bb
fix: console.log 주석 처리, 리액트 문법 오류 수정
yousuk88 Oct 30, 2024
d51d36e
add: router, link
yousuk88 Oct 30, 2024
5c8cdc9
fix: static assets 경로 수정
yousuk88 Oct 31, 2024
39e40f1
fix: 일부 경로오류 수정
yousuk88 Oct 31, 2024
4e5e809
add: dynamic button color change
yousuk88 Oct 31, 2024
c835006
fix: ProductList flex 속성 수정
yousuk88 Nov 3, 2024
e5a667d
add: 랜딩페이지 컴포넌트 파일 추가
yousuk88 Nov 3, 2024
36e439f
fix: Nav 뒤 배경 추가
yousuk88 Nov 3, 2024
a5b2d09
add: 랜딩페이지 이미지파일 추가
yousuk88 Nov 3, 2024
04cdd64
fix: 클래스명 underbar로 수정
yousuk88 Nov 3, 2024
99113c4
add: 랜딩페이지 HeroSection
yousuk88 Nov 3, 2024
1bf810e
add: 랜딩페이지 PopularSection
yousuk88 Nov 3, 2024
15cf2ac
add: 랜딩페이지 SearchSection
yousuk88 Nov 3, 2024
f993cc7
add: 랜딩페이지 RegisterProduct
yousuk88 Nov 3, 2024
45dc50b
add: 랜딩페이지 WeAreSection
yousuk88 Nov 3, 2024
8259585
fix: ProductList 미디어 쿼리 수정
yousuk88 Nov 3, 2024
691597f
add: Registration page
yousuk88 Nov 5, 2024
c8aac3e
feat: Registration page useState, handleChange
yousuk88 Nov 5, 2024
baaf77d
style: 기본 랜더링 이미지 수정
yousuk88 Nov 6, 2024
432323c
add: 로컬 서버로부터 호출 api
yousuk88 Nov 6, 2024
e2228a0
add: 로컬 서버로부터 호출 api 적용
yousuk88 Nov 6, 2024
6c78fd9
fix: 검색기능 수정
yousuk88 Nov 6, 2024
1403a2b
add: 로컬 서버로부터 호출 api 적용
yousuk88 Nov 6, 2024
bc0a7c9
fix: offse 기반 페이지네이션으로 수정
yousuk88 Nov 6, 2024
5675775
del: 수정 전 백업 삭제
yousuk88 Nov 6, 2024
b0e1e9e
fix: pagination 오류 수정
yousuk88 Nov 6, 2024
65555b0
add: 등록하기 기능 및 유효성 검사
yousuk88 Nov 6, 2024
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
Expand Up @@ -21,3 +21,8 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# reference files
src/pages/MeetingRoomFive.js
src/pages/Registration(TaejinLiveShare).js
src/pages/ApiComparisonTest.js
131 changes: 131 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"react-dom": "^18.3.1",
"react-router-dom": "^6.27.0",
"react-scripts": "5.0.1",
"styled-components": "^6.1.13",

Choose a reason for hiding this comment

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

CSS in JS 방식으로 css를 시도해 보신걸까요? 리터털 css가 작성되어 있진 않았던 것 같아서요. 공부하시면서 다양한 시도는 저는 항상 좋다고 생각합니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

module css
styled-components

이 두개 전부 써보고 싶어서 추가했는데
styled-components 가 어려워서 아직 모듈css로만 작업하고 있습니다.

다만 나중에 styled-components 도 시도해보려고 남겨뒀습니다 ㅎㅎ

"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down
Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions public/robots.txt

This file was deleted.

Binary file added public/static/images/Img_home_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/images/Img_home_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/images/Img_home_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/images/Img_home_bottom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/images/Img_home_top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added public/static/images/google.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/images/hide-pw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/images/ic_sort.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added public/static/images/ic_x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added public/static/images/kakao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added public/static/images/login-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added public/static/images/og-image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added public/static/images/show-pw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/images/user_profile.png
20 changes: 15 additions & 5 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@font-face {
font-family: 'Pretendard-Regular';
src: url('./assets/font/Pretendard-Regular.woff') format('woff');
font-family: "Pretendard-Regular";
src: url("/public/static/font/Pretendard-Regular.woff") format("woff");
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: 'rokaf';
src: url('./assets/font/ROKAF_Sans_Medium.ttf') format('truetype');
font-family: "rokaf";
src: url("/public/static/font/ROKAF_Sans_Medium.ttf") format("truetype");
}

* {
Expand All @@ -24,4 +24,14 @@ html {
a {
text-decoration: none;
color: inherit;
}
}

.coming_soon {
height: calc(100vh - 230px);
display: flex;
justify-content: center;
align-items: center;
font-size: 5rem;
font-weight: 700;
color: #3692ff;
}
50 changes: 41 additions & 9 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,47 @@
import Nav from './components/Nav/Nav'
import Main from './components/Main/Main'
import Footer from './components/Footer/Footer'
import './App.css'
import { BrowserRouter as Router, Route, Routes, useLocation } from 'react-router-dom';
import Nav from './components/Nav/Nav';
import Footer from './components/Footer/Footer';
import Main from './pages/Main';
import Login from './pages/Login';
import Signup from './pages/Signup';
import Items from './pages/Items';
import Community from './pages/Community';
import Faq from './pages/Faq';
import Privacy from './pages/Privacy';
import Registration from './pages/Registration';
// import ApiComparisonTest from './pages/ApiComparisonTest';
import './App.css';

function AppContent() {
const location = useLocation();

// Nav와 Footer를 제외할 경로 목록
const hideHeaderFooterPaths = ['/login', '/signup'];

return (
<>
{!hideHeaderFooterPaths.includes(location.pathname) && <Nav />}
<Routes>
<Route path="/" element={<Main />} />
<Route path="/login" element={<Login />} />
<Route path="/signup" element={<Signup />} />
<Route path="/items" element={<Items />} />
<Route path="/community" element={<Community />} />
<Route path="/faq" element={<Faq />} />
<Route path="/privacy" element={<Privacy />} />
<Route path="/registration" element={<Registration />} />
{/* <Route path="/test" element={<ApiComparisonTest />} /> */}
</Routes>
{!hideHeaderFooterPaths.includes(location.pathname) && <Footer />}
</>
);
}

function App() {
return (
<div>
<Nav />
<Main />
<Footer />
</div>
<Router>
<AppContent />
</Router>
);
}

Expand Down
42 changes: 42 additions & 0 deletions src/apis/ProductService(MongoDB).js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
const BASE_URL = 'http://localhost:8000/api/products';

export async function getProductList(offset, limit, orderBy, keyword) {
const params = new URLSearchParams({
offset,
limit,
orderBy,
keyword,
});

const url = `${BASE_URL}?${params}`;

try {
const response = await fetch(url);

if (!response.ok) {
throw new Error(`지정 에러: ${response.status} - ${response.statusText}`); // 내가 지정한 오류 핸들링
}

const data = await response.json();
return data;

} catch (error) {
console.error("기타 에러:", error); // 서버 등 예측하지 못한 에러 위해
}
}

export async function registerProduct(productData) {
try {
const response = await fetch(BASE_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(productData),
});
if (!response.ok) {
throw new Error(`등록 실패: ${response.status}`);
}
return await response.json();
} catch (error) {
console.error("상품 등록 중 오류:", error);
}
}
2 changes: 1 addition & 1 deletion src/apis/ProductService.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function getProductList(page, pageSize, orderBy, keyword) {
}

const data = await response.json();
console.log(data);
// console.log(data);
return data;

} catch (error) {
Expand Down
Binary file modified src/assets/images/placeholder.png
Loading