-
Notifications
You must be signed in to change notification settings - Fork 0
[UNI-19] feat : 불편한 길 제보 페이지 생성 및 제보 로직 구현 #35
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
25a4646
[UNI-82] feat : 불편한 길 제보 페이지 생성 및 지도 생성
dgfh0450 0073dda
[UNI-82] feat : 지도 Mock 데이터 (경로, 위험 주의 마커) 생성
dgfh0450 c13cf7c
[UNI-85] feat : 사용자 선 터치 시, 인접 간선 탐색 후 제보 마커 생성 로직 적용
dgfh0450 bd2b24f
[UNI-85] feat : 선택 마커 관리 State (reportMarker) 생성 및 MarkerTypesWithEle…
dgfh0450 bf5ee1d
[UNI-85] feat : 기존 마커 수정을 위한 선택 (state 변경, Marker 컨텐츠 변경) 적용
dgfh0450 e0d8e5d
[UNI-85] feat : 지도 터치 시, 선택된 마커 초기화 (state 초기화, Marker 컨텐트 초기화) 적용
dgfh0450 92a1dea
[UNI-85] feat : Marker 초기화 중복 로직 함수 분리
dgfh0450 a0a0b89
[UNI-85] feat : 선택된 마커 존재 시, 버튼 생성 및 Form 페이지 이동
dgfh0450 7d3d0d4
[UNI-82] fix : 누락된 경로 초기 마커 생성
dgfh0450 a1dbc4e
[UNI-83] feat : 상단 안내메세지 추가 및 애니메이션 적용
dgfh0450 bbb837d
[UNI-85] feat : 위험 주의 요소 제보 global State 선언 (제보 타입 (생성, 수정), 간선 시작 노드…
dgfh0450 addf28f
[UNI-83] feat : 제보 마커 생성 애니메이션, CTA 버튼 애니메이션 적용
dgfh0450 aeaf582
[UNI-19] feat : 메세지 Enum 수정 및 Lint 적용
dgfh0450 b2c8c21
[UNI-101] chore : Backoffice deploy 설정
dgfh0450 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,66 +1,66 @@ | ||
| name: FE CI / CD | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - fe | ||
| push: | ||
| branches: | ||
| - fe | ||
|
|
||
| jobs: | ||
| CI: | ||
| runs-on: ubuntu-latest | ||
| CI: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| env: | ||
| GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | ||
| IMAGE_NAME: uniro-fe | ||
| IMAGE_TAG: ${{ github.sha }} | ||
| env: | ||
| GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | ||
| IMAGE_NAME: uniro-fe | ||
| IMAGE_TAG: ${{ github.sha }} | ||
|
|
||
| steps: | ||
| - name: 코드 체크아웃 | ||
| uses: actions/checkout@v4 | ||
| steps: | ||
| - name: 코드 체크아웃 | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Google Cloud SDK 설정 | ||
| uses: "google-github-actions/auth@v2" | ||
| with: | ||
| credentials_json: ${{ secrets.GCP_SA_KEY }} | ||
| - name: Google Cloud SDK 설정 | ||
| uses: "google-github-actions/auth@v2" | ||
| with: | ||
| credentials_json: ${{ secrets.GCP_SA_KEY }} | ||
|
|
||
| - name: Docker를 위한 gcloud 인증 설정 | ||
| run: gcloud auth configure-docker --quiet | ||
| - name: Docker를 위한 gcloud 인증 설정 | ||
| run: gcloud auth configure-docker --quiet | ||
|
|
||
| - name: Create .env from secret | ||
| run: | | ||
| echo "${{ secrets.FE_ENV }}" > uniro_frontend/.env | ||
| - name: Create .env from secret | ||
| run: | | ||
| echo "${{ secrets.FE_ENV }}" > uniro_frontend/.env | ||
|
|
||
| - name: Docker 이미지 빌드 및 푸시 | ||
| run: | | ||
| docker build -t gcr.io/${{ env.GCP_PROJECT_ID }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} -f uniro_frontend/Dockerfile . | ||
| docker push gcr.io/${{ env.GCP_PROJECT_ID }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} | ||
| - name: Docker 이미지 빌드 및 푸시 | ||
| run: | | ||
| docker build -t gcr.io/${{ env.GCP_PROJECT_ID }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} -f uniro_frontend/Dockerfile . | ||
| docker push gcr.io/${{ env.GCP_PROJECT_ID }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} | ||
|
|
||
| CD: | ||
| runs-on: ubuntu-latest | ||
| needs: CI | ||
| CD: | ||
| runs-on: ubuntu-latest | ||
| needs: CI | ||
|
|
||
| env: | ||
| GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | ||
| IMAGE_NAME: uniro-fe | ||
| IMAGE_TAG: ${{ github.sha }} | ||
| DEPLOY_PATH: ${{ secrets.DEPLOY_SERVER_PATH }} | ||
| env: | ||
| GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | ||
| IMAGE_NAME: uniro-fe | ||
| IMAGE_TAG: ${{ github.sha }} | ||
| DEPLOY_PATH: ${{ secrets.DEPLOY_SERVER_PATH }} | ||
|
|
||
| steps: | ||
| - name: 배포 서버에 SSH로 연결하여 배포 | ||
| uses: appleboy/ssh-action@v0.1.5 | ||
| with: | ||
| host: ${{ secrets.DEPLOY_SERVER_HOST }} | ||
| username: ${{ secrets.DEPLOY_SERVER_USER }} | ||
| key: ${{ secrets.DEPLOY_SSH_KEY }} | ||
| envs: GCP_PROJECT_ID, IMAGE_NAME, IMAGE_TAG, DEPLOY_PATH, TEST | ||
| script: | | ||
| cd ${DEPLOY_PATH} | ||
| sudo docker ps -a --format '{{.ID}} {{.Names}}' \ | ||
| | grep -v 'nginx-container' \ | ||
| | awk '{print $1}' \ | ||
| | xargs -r sudo docker stop || true | ||
| sudo docker rm $(sudo docker ps -a -q) || true | ||
| sudo docker login -u _json_key --password-stdin https://gcr.io <<< '${{ secrets.GCP_SA_KEY }}' | ||
| sudo docker pull gcr.io/${GCP_PROJECT_ID}/${IMAGE_NAME}:${IMAGE_TAG} | ||
| sudo docker run -d --name ${IMAGE_NAME} -p 3000:3000 gcr.io/${GCP_PROJECT_ID}/${IMAGE_NAME}:${IMAGE_TAG} | ||
| sudo docker network connect nginx_app-network ${IMAGE_NAME} | ||
| steps: | ||
| - name: 배포 서버에 SSH로 연결하여 배포 | ||
| uses: appleboy/ssh-action@v0.1.5 | ||
| with: | ||
| host: ${{ secrets.DEPLOY_SERVER_HOST }} | ||
| username: ${{ secrets.DEPLOY_SERVER_USER }} | ||
| key: ${{ secrets.DEPLOY_SSH_KEY }} | ||
| envs: GCP_PROJECT_ID, IMAGE_NAME, IMAGE_TAG, DEPLOY_PATH, TEST | ||
| script: | | ||
| cd ${DEPLOY_PATH} | ||
| sudo docker ps -a --format '{{.ID}} {{.Names}}' \ | ||
| | egrep -v 'nginx-container|uniro-backoffice' \ | ||
| | awk '{print $1}' \ | ||
| | xargs -r sudo docker stop || true | ||
| sudo docker rm $(sudo docker ps -a -q) || true | ||
| sudo docker login -u _json_key --password-stdin https://gcr.io <<< '${{ secrets.GCP_SA_KEY }}' | ||
| sudo docker pull gcr.io/${GCP_PROJECT_ID}/${IMAGE_NAME}:${IMAGE_TAG} | ||
| sudo docker run -d --name ${IMAGE_NAME} -p 3000:3000 gcr.io/${GCP_PROJECT_ID}/${IMAGE_NAME}:${IMAGE_TAG} | ||
| sudo docker network connect nginx_app-network ${IMAGE_NAME} |
This file contains hidden or 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
This file contains hidden or 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,6 @@ | ||
| export enum ReportHazardMessage { | ||
| DEFAULT = "선 위를 눌러 제보할 지점을 선택하세요", | ||
| CREATE = "이 지점으로 새로운 제보를 진행할까요?", | ||
| UPDATE = "이 지점에 제보된 기존 정보를 바꿀까요?", | ||
| ERROR = "선 위에서만 선택 가능해요", | ||
| } |
This file contains hidden or 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
This file contains hidden or 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,22 @@ | ||
| import { create } from "zustand"; | ||
|
|
||
| interface ReportedHazardEdge { | ||
| reportType: "CREATE" | "UPDATE" | undefined; | ||
| setReportType: (type: "CREATE" | "UPDATE") => void; | ||
| startNode: google.maps.LatLng | google.maps.LatLngLiteral | undefined; | ||
| endNode: google.maps.LatLng | google.maps.LatLngLiteral | undefined; | ||
| setNode: ( | ||
| point1: google.maps.LatLng | google.maps.LatLngLiteral, | ||
| point2: google.maps.LatLng | google.maps.LatLngLiteral, | ||
| ) => void; | ||
| } | ||
|
|
||
| const useReportHazard = create<ReportedHazardEdge>((set) => ({ | ||
| reportType: undefined, | ||
| setReportType: (newType) => set(() => ({ reportType: newType })), | ||
| startNode: undefined, | ||
| endNode: undefined, | ||
| setNode: (point1, point2) => set(() => ({ startNode: point1, endNode: point2 })), | ||
| })); | ||
|
|
||
| export default useReportHazard; |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 원하던 데이터 형식인데 감사합니다!!