-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from Jin-coding-333/react-배진한-sprint6
[배진한] Sprint6
- Loading branch information
Showing
77 changed files
with
21,382 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"name": "sprint5", | ||
"version": "0.1.0", | ||
"private": true, | ||
"dependencies": { | ||
"@testing-library/jest-dom": "^5.17.0", | ||
"@testing-library/react": "^13.4.0", | ||
"@testing-library/user-event": "^13.5.0", | ||
"axios": "^1.7.7", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"react-router-dom": "^6.27.0", | ||
"react-scripts": "5.0.1", | ||
"web-vitals": "^2.1.4" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"react-app", | ||
"react-app/jest" | ||
] | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html lang="ko"> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="../src/img/icons/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<title>중고마켓</title> | ||
</head> | ||
|
||
<body> | ||
<div id="root" class="dk"></div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"short_name": "React App", | ||
"name": "Create React App Sample", | ||
"icons": [ | ||
{ | ||
"src": "favicon.ico", | ||
"sizes": "64x64 32x32 24x24 16x16", | ||
"type": "image/x-icon" | ||
}, | ||
{ | ||
"src": "logo192.png", | ||
"type": "image/png", | ||
"sizes": "192x192" | ||
}, | ||
{ | ||
"src": "logo512.png", | ||
"type": "image/png", | ||
"sizes": "512x512" | ||
} | ||
], | ||
"start_url": ".", | ||
"display": "standalone", | ||
"theme_color": "#000000", | ||
"background_color": "#ffffff" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# https://www.robotstxt.org/robotstxt.html | ||
User-agent: * | ||
Disallow: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { BrowserRouter, Route, Routes } from 'react-router-dom'; | ||
import ItemsPage from './pages/ItemsPage/index.jsx'; | ||
import HomePage from './pages/HomePage/index.jsx'; | ||
import LoginPage from './pages/LoginPage/index.jsx'; | ||
import RegisterItemPage from './pages/RegisterItemPage/index.jsx'; | ||
import ItemDetailPage from './pages/ItemDetailPage/index.jsx'; | ||
|
||
function App() { | ||
return ( | ||
<BrowserRouter > | ||
<Routes> | ||
<Route path='/' element={<HomePage />} /> | ||
<Route path='/items' element={<ItemsPage />} /> | ||
<Route path='/login' element={<LoginPage />} /> | ||
<Route path='/register' element={<RegisterItemPage />} /> | ||
<Route path='/itemDetail' element={<ItemDetailPage />} /> | ||
{/* <Route path='/community' element={<CommunityFeedPage />} /> */} | ||
</Routes> | ||
</BrowserRouter> | ||
); | ||
} | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const url = new URL('https://panda-market-api.vercel.app/products'); | ||
// export const url = new URL('http://localhost:8000/products'); | ||
export const postUrl = 'http://localhost:8000/products'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { url } from './endpoint.js'; | ||
|
||
async function getProducts(params = "") { | ||
const query = new URLSearchParams(params).toString(); | ||
// 파라미터를 자동으로 정리해서 인코딩 | ||
|
||
try { | ||
const response = await fetch(`${url}?${query}`); | ||
const data = await response.json(); | ||
return data | ||
} catch (err) { | ||
console.error('Fetch error:', err); | ||
} | ||
} | ||
|
||
export default getProducts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import axios from 'axios'; | ||
import { postUrl } from './endpoint.js'; | ||
|
||
const postProduct = async (surveyData) => { | ||
if (typeof surveyData === 'object') { | ||
const res = await axios.post(postUrl, surveyData); | ||
return res.data; | ||
} else { | ||
console.error('Post error:'); | ||
return; | ||
} | ||
} | ||
|
||
export default postProduct; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
footer { | ||
width: 100%; | ||
height: 16rem; | ||
background-color: #111827; | ||
display: flex; | ||
justify-content: center; | ||
padding-top: 3.2rem; | ||
} | ||
|
||
#footerContent { | ||
width: 152rem; | ||
height: 2rem; | ||
display: flex; | ||
justify-content: space-between; | ||
margin-left: 20rem; | ||
margin-right: 20rem; | ||
} | ||
|
||
#copyright { | ||
width: 12.2rem; | ||
height: 1.9rem; | ||
font-size: 1.6rem; | ||
font-weight: 400; | ||
line-height: 1.909rem; | ||
display: flex; | ||
text-align: center; | ||
color: #9CA3AF; | ||
} | ||
|
||
#info { | ||
width: 16.9rem; | ||
height: 1.9rem; | ||
gap: 3rem; | ||
opacity: 0rem; | ||
font-size: 1.6rem; | ||
font-weight: 400; | ||
line-height: 1.909rem; | ||
text-align: center; | ||
color: #E5E7EB; | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
|
||
#info a { | ||
text-decoration: none; | ||
color: #E5E7EB; | ||
} | ||
|
||
#socialIcons { | ||
list-style: none; | ||
padding-left: 0rem; | ||
margin-left: 1.6rem; | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
|
||
#socialIcons img { | ||
width: 2rem; | ||
height: 2rem; | ||
margin-right: 1.2rem; | ||
filter: drop-shadow(0 0 0.75rem rgba(0, 0, 0, 15%)); | ||
} | ||
|
||
@media (max-width: 474px) { | ||
|
||
#copyright { | ||
position: relative; | ||
bottom: -40px; | ||
} | ||
|
||
#footerContent { | ||
margin-left: 21px; | ||
margin-right: 0rem; | ||
} | ||
|
||
#info { | ||
width: 156.9px; | ||
position: relative; | ||
left: -127px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import faceBookImg from '../../img/social/ic_facebook.png'; | ||
import twitterImg from '../../img/social/ic_twitter.png'; | ||
import youtubeImg from '../../img/social/ic_youtube.png'; | ||
import instagramImg from '../../img/social/ic_instargram.png'; | ||
import './index.css'; | ||
|
||
function Footer() { | ||
return ( | ||
<footer> | ||
<div id="footerContent"> | ||
<div id="copyright">© Codeit 2024</div> | ||
|
||
<div id="info"> | ||
<div><a href="/privacy">Privacy Policy</a></div> | ||
<div id='faq'><a href="/faq">FAQ</a></div> | ||
</div> | ||
|
||
<div id="socialIcons"> | ||
<a href="https://www.facebook.com/?locale=ko_KR"><img src={faceBookImg} alt="Facebook" /></a> | ||
<a href="https://x.com/?lang=ko"><img src={twitterImg} alt="Twitter" /></a> | ||
<a href="https://www.youtube.com/"><img src={youtubeImg} alt="YouTube" /></a> | ||
<a href="https://www.instagram.com/sem/campaign/emailsignup"><img src={instagramImg} alt="Instagram" /></a> | ||
</div> | ||
</div> | ||
</footer> | ||
) | ||
} | ||
|
||
export default Footer; |
Oops, something went wrong.