Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a15f185
♻️ Refactor: 주문상태 조회 api 연동
yeonhee7935 Feb 25, 2025
97bc86a
✨ Feat: toss pay 추가
Jeon-suhyeon Feb 27, 2025
9fa3f15
🐛 Fix: 불필요한 콘솔로그 제거
up456 Feb 27, 2025
4823589
🐛 Fix: 리뷰 에디터 모달 스크롤 되지 않던 부분 수정
up456 Feb 27, 2025
6aba245
🐛 Fix: 리뷰 탭 애니메이션 속도 빠르게 수정
up456 Feb 27, 2025
a2f5647
🐛 Fix: 리뷰 삭제 모달 애니메이션 제거
up456 Feb 27, 2025
fee4e34
✨ Feat: 리뷰 콘텐츠에 벨리데이션 에러 문구 노출
up456 Feb 27, 2025
aa53e26
✨ Feat: 리뷰 에디터 모달에 로딩 UI 추가
up456 Feb 27, 2025
61d4339
🎨 Design: Loading component가 항상 최상단에 위치하도록 z-index-50으로 설정
up456 Feb 27, 2025
2ed88c3
🐛 Fix: 리뷰 이미지 캐시 무효화 처리
up456 Feb 27, 2025
372eb65
feat: toss pay 결제 테스트 배포
Jeon-suhyeon Feb 27, 2025
d35b27f
Merge pull request #156 from FC-InnerCircle-ICD2/feat/pay-sdk
freechird2 Feb 27, 2025
9f0d6f3
chore: dev 배포
Jeon-suhyeon Feb 27, 2025
eea373d
Merge pull request #157 from FC-InnerCircle-ICD2/feat/dev-deploy
freechird2 Feb 27, 2025
681d02b
chore: dev 배포 테스트
Jeon-suhyeon Feb 27, 2025
66b94f9
Merge pull request #158 from FC-InnerCircle-ICD2/feat/dev-deploy
freechird2 Feb 27, 2025
b986f44
chore: dev배포
Jeon-suhyeon Feb 27, 2025
241c024
Merge pull request #160 from FC-InnerCircle-ICD2/feat/dev-deploy
freechird2 Feb 27, 2025
17c0b60
chore: dev배포
Jeon-suhyeon Feb 27, 2025
d54f99f
Merge pull request #161 from FC-InnerCircle-ICD2/feat/dev-deploy
freechird2 Feb 27, 2025
d92e926
feat: order list 무한스크롤 구현
Jeon-suhyeon Feb 27, 2025
663c93b
✨ Feat: 주문내역 list 수정
Jeon-suhyeon Feb 28, 2025
7376d95
Merge pull request #162 from FC-InnerCircle-ICD2/feat/order-list
freechird2 Feb 28, 2025
398d186
✨ Feat: address 수정
Jeon-suhyeon Feb 28, 2025
cced6d3
Merge pull request #159 from FC-InnerCircle-ICD2/fix/review
up456 Feb 28, 2025
e373c19
fix: 주소록 수정
Jeon-suhyeon Feb 28, 2025
aca515a
♻️ Refactor: merge with dev
yeonhee7935 Mar 1, 2025
e66f293
♻️ Refactor: 주문상태 useGetOrdersDetail에서 관리하도록 수정
yeonhee7935 Mar 1, 2025
35446a4
fix: 주소록 수정 및 홈 페이지 주소 연동
Jeon-suhyeon Mar 1, 2025
bbda56c
Merge pull request #163 from FC-InnerCircle-ICD2/feat/order-status
freechird2 Mar 1, 2025
85ff103
Merge pull request #164 from FC-InnerCircle-ICD2/fix/address
freechird2 Mar 1, 2025
a07b0dd
fix: 주문 상태 pulling 수정
Jeon-suhyeon Mar 1, 2025
12654af
Merge pull request #165 from FC-InnerCircle-ICD2/fix/order-detail-pul…
freechird2 Mar 1, 2025
0ea8eca
fix: env 추가
Jeon-suhyeon Mar 1, 2025
76e7a46
Merge pull request #166 from FC-InnerCircle-ICD2/fix/order-detail-pul…
freechird2 Mar 1, 2025
edee272
fix: env 추가
Jeon-suhyeon Mar 1, 2025
75511db
Merge pull request #167 from FC-InnerCircle-ICD2/fix/order-detail-pul…
freechird2 Mar 1, 2025
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
6 changes: 4 additions & 2 deletions .github/workflows/develop-deploy-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

# Docker 이미지 빌드 및 태깅
- name: Build and push
uses: docker/build-push-action@v3
Expand All @@ -27,7 +27,9 @@ jobs:
NEXT_PUBLIC_API_MOCKING=${{ secrets.NEXT_PUBLIC_API_MOCKING }}
NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_KAKAO_APP_KEY=${{ secrets.NEXT_PUBLIC_KAKAO_APP_KEY }}

NEXT_PUBLIC_PAY200_KEY=${{ secrets.NEXT_PUBLIC_PAY200_KEY }}
NEXT_PUBLIC_TOSS_PAY_KEY=${{ secrets.NEXT_PUBLIC_TOSS_PAY_KEY }}
NEXT_PUBLIC_KAKAO_API_KEY=${{ secrets.NEXT_PUBLIC_KAKAO_API_KEY }}
# EC2 도커 컴포즈 실행
- name: SSH and Deploy
uses: appleboy/ssh-action@v0.1.8
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/main-deploy-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v3
with:
Expand All @@ -24,6 +24,8 @@ jobs:
NEXT_PUBLIC_API_MOCKING=${{ secrets.NEXT_PUBLIC_API_MOCKING }}
NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_PROD_API_URL }}
NEXT_PUBLIC_KAKAO_APP_KEY=${{ secrets.NEXT_PUBLIC_KAKAO_APP_KEY }}
NEXT_PUBLIC_PAY200_KEY=${{ secrets.NEXT_PUBLIC_PAY200_KEY }}
NEXT_PUBLIC_TOSS_PAY_KEY=${{ secrets.NEXT_PUBLIC_TOSS_PAY_KEY }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
10 changes: 5 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"prettier.requireConfig": true,
"prettier.useEditorConfig": false,
"prettier.requireConfig": false,
"prettier.useEditorConfig": true,
"javascript.format.enable": false,
"typescript.format.enable": false,
"editor.formatOnSaveTimeout": 1500,
"editor.formatOnSaveTimeout": 5000,
"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand All @@ -27,9 +27,9 @@
},
"[typescriptreact]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "vscode.typescript-language-features"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSaveMode": "modifications",
"editor.formatOnSaveMode": "file",
"tailwindCSS.validate": false,
"files.watcherExclude": {
"**/node_modules/**": true,
Expand Down
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ RUN apk add --no-cache libc6-compat
ARG NEXT_PUBLIC_API_MOCKING
ARG NEXT_PUBLIC_API_URL
ARG NEXT_PUBLIC_KAKAO_APP_KEY

ARG NEXT_PUBLIC_PAY200_KEY
ARG NEXT_PUBLIC_TOSS_PAY_KEY
ARG NEXT_PUBLIC_KAKAO_API_KEY
# .env 파일 생성
RUN echo "NEXT_PUBLIC_API_MOCKING=${NEXT_PUBLIC_API_MOCKING}" > .env && \
echo "NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}" >> .env && \
echo "NEXT_PUBLIC_KAKAO_APP_KEY=${NEXT_PUBLIC_KAKAO_APP_KEY}" >> .env
echo "NEXT_PUBLIC_KAKAO_APP_KEY=${NEXT_PUBLIC_KAKAO_APP_KEY}" >> .env && \
echo "NEXT_PUBLIC_PAY200_KEY=${NEXT_PUBLIC_PAY200_KEY}" >> .env && \
echo "NEXT_PUBLIC_TOSS_PAY_KEY=${NEXT_PUBLIC_TOSS_PAY_KEY}" >> .env && \
echo "NEXT_PUBLIC_KAKAO_API_KEY=${NEXT_PUBLIC_KAKAO_API_KEY}" >> .env

# .env 파일 확인
RUN echo "=== .env file contents ===" && cat .env
Expand Down
12 changes: 9 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.8"
version: '3.8'

services:
o2o-fe:
Expand All @@ -10,16 +10,22 @@ services:
- NEXT_PUBLIC_API_MOCKING=${NEXT_PUBLIC_API_MOCKING}
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
- NEXT_PUBLIC_KAKAO_APP_KEY=${NEXT_PUBLIC_KAKAO_APP_KEY}
- NEXT_PUBLIC_PAY200_KEY=${NEXT_PUBLIC_PAY200_KEY}
- NEXT_PUBLIC_TOSS_PAY_KEY=${NEXT_PUBLIC_TOSS_PAY_KEY}
- NEXT_PUBLIC_KAKAO_API_KEY=${NEXT_PUBLIC_KAKAO_API_KEY}
image: yong7317/o2o-fe:latest
ports:
- '3000:3000'
environment:
- NEXT_PUBLIC_API_MOCKING=${NEXT_PUBLIC_API_MOCKING}
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
- NEXT_PUBLIC_KAKAO_APP_KEY=${NEXT_PUBLIC_KAKAO_APP_KEY}
- NEXT_PUBLIC_PAY200_KEY=${NEXT_PUBLIC_PAY200_KEY}
- NEXT_PUBLIC_TOSS_PAY_KEY=${NEXT_PUBLIC_TOSS_PAY_KEY}
- NEXT_PUBLIC_KAKAO_API_KEY=${NEXT_PUBLIC_KAKAO_API_KEY}
networks:
- o2o-network

networks:
o2o-network:
driver: bridge
driver: bridge
14 changes: 0 additions & 14 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import js from '@eslint/js'
import nextPlugin from '@next/eslint-plugin-next'
import pluginPrettier from 'eslint-plugin-prettier'
import tailwind from 'eslint-plugin-tailwindcss'
import ts from 'typescript-eslint'

Expand All @@ -16,24 +15,11 @@ export default [
plugins: {
'@typescript-eslint': ts.plugin,
tailwindcss: tailwind,
prettier: pluginPrettier,
'@next/next': nextPlugin,
},
rules: {
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'prettier/prettier': [
'error',
{
tabWidth: 2,
useTabs: false,
singleQuote: true,
trailingComma: 'es5',
semi: false,
endOfLine: 'lf',
printWidth: 100,
},
],
indent: 'off',
'@typescript-eslint/indent': 'off',
'tailwindcss/no-custom-classname': 'off',
Expand Down
1 change: 1 addition & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const nextConfig: NextConfig = {

return config
},
reactStrictMode: false,
output: 'standalone',
devIndicators: {
buildActivity: false,
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},
"dependencies": {
"@hookform/resolvers": "^3.10.0",
"@pay200/sdk": "^0.0.5",
"@radix-ui/react-accordion": "^1.2.2",
"@radix-ui/react-checkbox": "^1.1.3",
"@radix-ui/react-dialog": "^1.1.4",
Expand Down Expand Up @@ -49,6 +50,7 @@
"@next/eslint-plugin-next": "^15.1.3",
"@svgr/webpack": "^8.1.0",
"@tanstack/react-query-devtools": "^5.66.3",
"@tosspayments/tosspayments-sdk": "^2.3.4",
"@types/eslint-plugin-tailwindcss": "^3",
"@types/node": "^20",
"@types/react": "^19",
Expand All @@ -58,15 +60,16 @@
"@yarnpkg/sdks": "^3.2.0",
"eslint": "^9",
"eslint-config-next": "15.1.3",
"eslint-config-prettier": "^9.1.0",
"eslint-config-prettier": "^10.0.2",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-tailwindcss": "^3.17.5",
"husky": "^9.1.7",
"kakao.maps.d.ts": "^0.1.40",
"msw": "^2.7.0",
"postcss": "^8",
"prettier": "^3.4.2",
"prettier-plugin-tailwindcss": "^0.6.9",
"prettier": "^3.5.2",
"prettier-plugin-tailwindcss": "^0.6.11",
"tailwindcss": "^3.4.1",
"typescript": "^5",
"typescript-eslint": "^8.19.0"
Expand Down
4 changes: 2 additions & 2 deletions src/api/useDeleteAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const useDeleteAddress = () => {
const queryClient = useQueryClient()

return useMutation({
mutationFn: async (addressId: string) => {
mutationFn: async (addressId: number) => {
return await api.delete(`members/address/${addressId}`)
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['completed-addresses'] })
// queryClient.invalidateQueries({ queryKey: ['completed-addresses'] })
},
})
}
Expand Down
22 changes: 16 additions & 6 deletions src/api/useGetAddress.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
import { api } from '@/lib/api'
import addressStore from '@/store/addressStore'
import memberStore from '@/store/user'
import { useQuery, useQueryClient } from '@tanstack/react-query'

interface Address {
id: number
isDefault: boolean
roadAddress: string
jibunAddress: string
detailAddress: string
latitude: number
longitude: number
alias?: string
}

interface AddressData {
defaultAddress: Address
house: Address
company: Address
others: Address[]
export interface AddressResponseData {
defaultAddress?: Address
house?: Address
company?: Address
others?: Address[]
}

const useGetAddress = () => {
const qc = useQueryClient()
const { member } = memberStore()
const { setAddress } = addressStore()

const { data: address, isSuccess } = useQuery({
queryKey: ['address'],
queryFn: async () => {
return await api.get<AddressData>(`members/address`)
const response = await api.get<AddressResponseData>(`members/address`)
setAddress(response)

return response
},
enabled: !!member,
})

const resetGetAddress = () => {
Expand Down
27 changes: 27 additions & 0 deletions src/api/useGetAddressToGeolocation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { useMutation } from '@tanstack/react-query'
import ky from 'ky'

const useGetAddressToGeolocation = () => {
return useMutation({
mutationFn: (address: string) =>
ky
.get<{
documents: {
jibunAddress: string
roadAddress: string
x: string
y: string
}[]
}>('https://dapi.kakao.com/v2/local/search/address.json', {
headers: {
Authorization: `KakaoAK ${process.env.NEXT_PUBLIC_KAKAO_API_KEY}`,
},
searchParams: {
query: address,
},
})
.json(),
})
}

export default useGetAddressToGeolocation
37 changes: 37 additions & 0 deletions src/api/useGetGeolocationToAddress.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { useMutation } from '@tanstack/react-query'
import ky from 'ky'

interface GeolocationToAddressResponse {
address_name: string
main_address_no: string
mountain_yn: string
region_1depth_name: string
region_2depth_name: string
region_3depth_name: string
sub_address_no: string
zip_code: string
}

const useGetGeolocationToAddress = () => {
return useMutation({
mutationFn: ({ longitude, latitude }: { longitude: string; latitude: string }) =>
ky
.get<{
documents: {
address: GeolocationToAddressResponse
road_address: GeolocationToAddressResponse
}[]
}>('https://dapi.kakao.com/v2/local/geo/coord2address.json', {
headers: {
Authorization: `KakaoAK ${process.env.NEXT_PUBLIC_KAKAO_API_KEY}`,
},
searchParams: {
x: longitude,
y: latitude,
},
})
.json(),
})
}

export default useGetGeolocationToAddress
20 changes: 20 additions & 0 deletions src/api/useGetOrderStatus.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { api } from '@/lib/api'
import { useQuery } from '@tanstack/react-query'
import { OrderStatus } from './useGetOrdersDetail'

const useGetOrderStatus = (orderId?: string) => {
const { data: status, isSuccess } = useQuery({
queryKey: ['orderStatus', orderId],
queryFn: async () => {
return await api.get<{ status: OrderStatus }>(`orders/${orderId}/status`)
},
refetchInterval: (data) => {
const shouldRefetch = ['NEW', 'ONGOING'].includes(data.state.data?.status as OrderStatus)
return shouldRefetch ? 5000 : false
},
})

return { status, isSuccess }
}

export default useGetOrderStatus
51 changes: 0 additions & 51 deletions src/api/useGetOrders.ts

This file was deleted.

Loading