diff --git a/package.json b/package.json index 5ad8d5c..7586621 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@emotion/react": "^11.10.5", "@emotion/styled": "^11.10.5", "@types/node": "^18.11.19", + "axios": "^1.3.3", "react": "^18.2.0", "react-dom": "^18.2.0", "react-query": "^3.39.3", diff --git a/public/mockdata.json b/public/mockdata.json new file mode 100644 index 0000000..d8f556d --- /dev/null +++ b/public/mockdata.json @@ -0,0 +1,162 @@ +[ + { + "id": 1, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e66f604e7b0e6900f9ac53a43965300eb9a", + "title": "test1", + "text": "test1", + "category": "test", + "limitDate": 7 + }, + { + "id": 2, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e66effd194bae87d73dd00522794070855d", + "title": "test2", + "text": "test2", + "category": "test", + "limitDate": 7 + }, + { + "id": 3, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e66b3a18fdf58bc66ec3f4b6084b7d0b570", + "title": "test3", + "text": "test3", + "category": "test", + "limitDate": 7 + }, + { + "id": 4, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e668f324a0b9c48f77dbce3a43bd11ce785", + "title": "test4", + "text": "test4", + "category": "test", + "limitDate": 7 + }, + { + "id": 5, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e66effd194bae87d73dd00522794070855d", + "title": "test5", + "text": "test5", + "category": "test", + "limitDate": 7 + }, + { + "id": 6, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e669cbcbe2de7f4969efc79ab353e0c19e8", + "title": "test6", + "text": "test6", + "category": "test", + "limitDate": 7 + }, + { + "id": 7, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e6671b950f0a05bd8dba8b11dbe535ebe4b", + "title": "test7", + "text": "test7", + "category": "test", + "limitDate": 7 + }, + { + "id": 8, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e66f604e7b0e6900f9ac53a43965300eb9a", + "title": "test8", + "text": "test8", + "category": "test", + "limitDate": 7 + }, + { + "id": 9, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e669f5287469802eca457586a25a096fd31", + "title": "test9", + "text": "test9", + "category": "test", + "limitDate": 7 + }, + { + "id": 10, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e66f604e7b0e6900f9ac53a43965300eb9a", + "title": "test10", + "text": "test10", + "category": "test", + "limitDate": 7 + }, + { + "id": 11, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e66f604e7b0e6900f9ac53a43965300eb9a", + "title": "test11", + "text": "test11", + "category": "test", + "limitDate": 7 + }, + { + "id": 12, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e668b566dca82634c93f811198148a26065", + "title": "test12", + "text": "test12", + "category": "test", + "limitDate": 7 + }, + { + "id": 13, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e66f604e7b0e6900f9ac53a43965300eb9a", + "title": "test13", + "text": "test13", + "category": "test", + "limitDate": 7 + }, + { + "id": 14, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e66b3a18fdf58bc66ec3f4b6084b7d0b570", + "title": "test14", + "text": "test14", + "category": "test", + "limitDate": 7 + }, + { + "id": 15, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e66effd194bae87d73dd00522794070855d", + "title": "test15", + "text": "test15", + "category": "test", + "limitDate": 7 + }, + { + "id": 16, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e669cbcbe2de7f4969efc79ab353e0c19e8", + "title": "test16", + "text": "test16", + "category": "test", + "limitDate": 7 + }, + { + "id": 17, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e668f324a0b9c48f77dbce3a43bd11ce785", + "title": "test17", + "text": "test17", + "category": "test", + "limitDate": 7 + }, + { + "id": 18, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e668b566dca82634c93f811198148a26065", + "title": "test18", + "text": "test18", + "category": "test", + "limitDate": 7 + }, + { + "id": 19, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e66b3a18fdf58bc66ec3f4b6084b7d0b570", + "title": "test19", + "text": "test19", + "category": "test", + "limitDate": 7 + }, + { + "id": 20, + "imageUrl": "https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e66c37d537a8f2c6f426591be6b8dc7b36a", + "title": "test20", + "text": "test20", + "category": "test", + "limitDate": 7 + } +] diff --git a/src/App.tsx b/src/App.tsx index bf6dbcf..9764196 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,26 @@ +import { BrowserRouter, Route, Routes } from 'react-router-dom'; +import { QueryClientProvider } from 'react-query'; +import { ReactQueryDevtools } from 'react-query/devtools'; +import { getClient } from '@/config/queryClient'; +import { Home, ProductDetail, ProductList } from '@/pages'; +import { Header } from '@/components/Header'; + +const queryClient = getClient(); + function App() { - return
{title}
+{limitDate}일 후 대여 가능
+ +