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

[TEAM-25] Airbnb 3주차 2번째 PR Nick + Benny #301

Open
wants to merge 86 commits into
base: team-25
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
5b123a3
Initialize project using Create React App
kimub May 24, 2022
0cba9c2
Update issue templates
jinan159 May 25, 2022
b0240fd
Update issue templates
jinan159 May 25, 2022
94d90f6
Update issue templates
jinan159 May 25, 2022
e968bab
Update issue templates
jinan159 May 25, 2022
e63d496
refactor: 코드리뷰 피드백 수정
kimub May 26, 2022
6a84d3b
refactor: Hero, GNB 마크업 스타일 수정
kimub May 26, 2022
3d479f4
충돌해결
decay95 May 26, 2022
2b0c727
Merge branch 'FE' of https://github.com/jinan159/airbnb into FE
decay95 May 26, 2022
dd22fe1
feat: header 마크업, 스타일 추가
kimub May 26, 2022
c4f5fda
remove: js 파일 제거
kimub May 26, 2022
5f3bda6
refactor: header 마크업 스타일 리팩토링
kimub May 26, 2022
df5b502
feat: search 마크업, 스타일 추가
kimub May 26, 2022
485aa8f
style: favicon 추가
kimub May 27, 2022
eb4a57a
Merge branch 'FE' of https://github.com/jinan159/airbnb into FE
decay95 May 27, 2022
e1a5c28
feat: modal portal 기능 추가
kimub May 27, 2022
8ed45cf
Merge pull request #12 from jinan159/feature/#2
decay95 May 27, 2022
d044376
refactor: type들 파일로 따로 분류
kimub May 27, 2022
b6a39b9
feat: modal backdrop show, hide 기능 추가
kimub May 27, 2022
d22d90d
feat: 캘린더 모달 내 캘린더 버튼 추가
kimub May 28, 2022
e7ec1b9
feat: Calendar 년, 월에 따른 일수 생성 기능 추가
kimub May 28, 2022
d41a67a
feat: 캐러셀 움직이는 기능 추가
kimub May 29, 2022
e3bebef
feat: 캘린더 새로운 년, 월 추가하는 기능 추가
kimub May 29, 2022
26c71cb
feat: 캘린더 마지막 요소일때만 추가하는 기능
kimub May 29, 2022
a3d56bd
style: 불필요한 주석 제거
kimub May 29, 2022
66910b9
style: 캘린더 '일'에 마우스 호버시 스타일 추가
kimub May 29, 2022
cc98b3f
refactor: 중복되는 함수, type 변경
kimub May 29, 2022
e9aea54
feat: 과거 일자 스타일, 클릭 방지 기능 추가
kimub May 29, 2022
20d6f63
fix: 캘린더에서 오늘 날짜를 비활성시키는 버그 픽스
kimub May 29, 2022
58e3755
feat: DateCell 컴포넌트 추가
kimub May 30, 2022
5a52c7a
refactor: 코드리뷰 피드백 수정
kimub May 30, 2022
17d3187
Merge pull request #17 from jinan159/feature/#2
decay95 May 30, 2022
e30121d
Merge branch 'FE' of https://github.com/jinan159/airbnb into FE
decay95 May 30, 2022
562faa3
style: CalendarModal 변수명 리네임, 상수 추가
kimub May 30, 2022
6de4b62
refactor: CalendarModal reducer 부분 리팩토링
kimub May 30, 2022
2d577af
rename: 파일들 FE 폴더로 이동
kimub May 31, 2022
6745baf
feat: 라우터를 이용시 공통으로 보이는 배경 수정
kimub May 31, 2022
3e864a9
feat: 캘린더 요소 클릭시 선택되는 기능 구현
kimub May 31, 2022
2b79a7e
fix: 체크인 관련 버그 수정
kimub May 31, 2022
83da427
feat: 캘린더 체크인, 체크아웃 기능 구현 완료
kimub May 31, 2022
b965d4b
[FE] 체크인, 체크아웃 기능 구현 (#24)
kimub May 31, 2022
1fd116d
[FE] footer 레이아웃 구현 완료 (#27)
Jun 1, 2022
33af92c
[FE] 인원수 기능 구현 완료, 코드 전체적인 리팩토링 (#28)
Jun 2, 2022
e220d2e
build: 프론트 배포 스크립트 추가
jinan159 Jun 3, 2022
5d56bc6
Merge pull request #31 from jinan159/feature/fe-deploy
jinan159 Jun 3, 2022
88e22e5
FE 1차 테스트 배포 (#32)
jinan159 Jun 3, 2022
face033
build: github action 빌드 Container registry 변경
jinan159 Jun 3, 2022
e9f7437
Merge pull request 33 from jinan159/feature/fe-deploy
jinan159 Jun 3, 2022
94bc92f
Merge branch 'deploy-fe' into FE
jinan159 Jun 3, 2022
1740b5d
FE 배포 테스트 2차 (#34)
jinan159 Jun 3, 2022
f1c91c9
build: github action 이미지 생성 로직 수정
jinan159 Jun 3, 2022
4026c0d
Merge branch 'deploy-fe' into FE
jinan159 Jun 3, 2022
c3aab55
FE 배포 테스트 3차 (#35)
jinan159 Jun 3, 2022
f9d23a3
fix: github action docker build 경로 수정
jinan159 Jun 3, 2022
4aec061
Merge branch 'deploy-fe' into FE
jinan159 Jun 3, 2022
fbd81cc
FE 배포 테스트 4차 (#36)
jinan159 Jun 3, 2022
f035361
build: docker build 수정
jinan159 Jun 3, 2022
3b85f43
Merge branch 'deploy-fe' into FE
jinan159 Jun 3, 2022
5bb0509
배포 테스트 최종 (#37)
jinan159 Jun 3, 2022
e736f55
fix: Docker build 경로 오류 수정
jinan159 Jun 3, 2022
f2e7dc0
Merge branch 'deploy-fe' into FE
jinan159 Jun 3, 2022
c767473
[FE] rooms 페이지 레이아웃 구성 중 (#39)
Jun 3, 2022
473f387
build: fe 자동배포 스크립트 추가
jinan159 Jun 4, 2022
6376c34
Merge pull request #40 from jinan159/fe-auto-deploy
jinan159 Jun 4, 2022
820c678
Update appspec.yml
jinan159 Jun 4, 2022
95f1627
[FE] rooms 페이지 초기화면 레이아웃 구성 (#46)
Jun 7, 2022
eb21b94
rename: context 위치 변경
decay95 Jun 8, 2022
396aa3a
feat: 요금 정보창 style 정의
decay95 Jun 8, 2022
e0c3970
feat: 요금 정보 context 구현
decay95 Jun 8, 2022
9c4a33f
feat: 임시 mok data 추가
decay95 Jun 8, 2022
1bb1ef8
feat: 요금 정보 Chart, Modal type 지정
decay95 Jun 8, 2022
5cf56f8
feat: 요금 정보 차트 구현
decay95 Jun 8, 2022
6d42ee2
feat: 요금 정보 멀티 레인지 슬라이더 구현
decay95 Jun 8, 2022
a9379a3
요금 정보 modal창 구현
decay95 Jun 8, 2022
6e2f2a8
remove: Fare Context 위치 변경
decay95 Jun 8, 2022
f23f562
요금 정보 기능 구현
decay95 Jun 8, 2022
af8c02f
fix: merge conflict 해결
decay95 Jun 8, 2022
2fe1fdb
feat: 요금 정보 초기화 버튼 구현
decay95 Jun 8, 2022
08b7628
feat: 카카오 맵 추가
kimub Jun 7, 2022
4a413ff
feat: 카카오맵 중심좌표 코드스쿼드로 변경
kimub Jun 8, 2022
50af3c5
feat: api 명세에 따른 목데이터 변경
kimub Jun 9, 2022
fa50313
feat: api요청으로 숙소 리스트 파싱
kimub Jun 9, 2022
ff100a8
feat: 맵에 숙소, 가격 표시 기능 추가
kimub Jun 9, 2022
cb962ba
Merge pull request #50 from jinan159/feature/#47
decay95 Jun 10, 2022
3096b1a
conflict 해결
decay95 Jun 10, 2022
a4d69a3
Merge branch 'FE' of https://github.com/jinan159/airbnb into FE
decay95 Jun 10, 2022
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
38 changes: 0 additions & 38 deletions .eslintrc.js

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/deploy-prod-fe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: 프론트 운영 CD

on:
push:
branches: [deploy-fe]

jobs:
buildAndDeploy:
name: 프론트 운영 CD
runs-on: ubuntu-18.04
defaults:
run:
shell: bash
env:
zip-name: airbnb-fe.zip
working-directory: ./FE
node-version: 16.13.1

steps:
- name: 체크아웃 Github-Action
uses: actions/checkout@v3
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}
- run: npm ci
working-directory: ${{ env.working-directory }}

- run: npm run build --if-present
working-directory: ${{ env.working-directory }}

- name: Docker Buildx 준비
uses: docker/setup-buildx-action@v1

- name: Github Container Registry 에 로그인
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_ACCESS_KEY }}
# working-directory: ${{ env.working-directory }}
- name: 이미지 빌드 및 푸시
uses: docker/build-push-action@v2
with:
context: ${{ env.working-directory }}
file: ${{ env.working-directory }}/Dockerfile
push: true
tags:
ghcr.io/${{ github.repository_owner }}/airbnb-fe:latest

- name: airbnb-deploy.zip 생성
run: zip -r ./${{ env.zip-name }} ./scripts ./appspec.yml
working-directory: ${{ env.working-directory }}

- name: AWS Credential 설정
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-2

- name: AWS S3 로 업로드
run: aws s3 cp --region ap-northeast-2 ./${{ env.zip-name }} s3://airbnb-s3-bucket-deploy/${{ env.zip-name }}
working-directory: ${{ env.working-directory }}

- name: AWS CodeDeploy 배포 실행
run: aws deploy create-deployment
--application-name airbnb-deploy
--deployment-group airbnb-fe-dg
--s3-location bucket=airbnb-s3-bucket-deploy,key=${{ env.zip-name }},bundleType=zip
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

10 changes: 0 additions & 10 deletions .prettierrc.js

This file was deleted.

2 changes: 2 additions & 0 deletions FE/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.env
14 changes: 14 additions & 0 deletions FE/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:16.13.1

# 소스 이동
COPY . /app
WORKDIR /app

# npm install 설정
RUN \
npm install -g serve

# 3000 포트 허용
EXPOSE 3000

CMD ["serve", "-s", "build"]
20 changes: 20 additions & 0 deletions FE/appspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 0.0
os: linux
files:
- source: /
destination: /home/ec2-user/app-fe
overwrite: yes

permissions:
- object: /
pattern: "**"
owner: ec2-user
group: ec2-user

hooks:
AfterInstall:

ApplicationStart:
- location: scripts/deploy.sh
timeout: 300
runas: root
2 changes: 1 addition & 1 deletion FE/package-lock.json

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

20 changes: 10 additions & 10 deletions FE/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@
"@mui/material": "^5.8.1",
"@mui/styled-engine": "npm:@mui/styled-engine-sc@latest",
"@mui/styled-engine-sc": "^5.8.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.2.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.1",
"@types/node": "^16.11.36",
"@types/react": "^18.0.9",
"@types/react-dom": "^18.0.5",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"styled-components": "^5.3.5",
Expand Down Expand Up @@ -50,6 +41,15 @@
]
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.2.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.1",
"@types/node": "^16.11.36",
"@types/react": "^18.0.9",
"@types/react-dom": "^18.0.5",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"@types/styled-components": "^5.1.25",
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
Expand All @@ -65,4 +65,4 @@
"resolutions": {
"@mui/styled-engine": "npm:@mui/styled-engine-sc@latest"
}
}
}
Binary file added FE/public/assets/images/Rectangle 2-1.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 FE/public/assets/images/Rectangle 2-2.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 FE/public/assets/images/Rectangle 2-3.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 FE/public/assets/images/Rectangle 2.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 FE/public/assets/images/img-1.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 FE/public/assets/images/img-2.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 FE/public/assets/images/img-3.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 FE/public/assets/images/img-4.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 FE/public/assets/images/img-5.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 FE/public/assets/images/img-6.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 FE/public/assets/images/img-7.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 FE/public/assets/images/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions FE/public/assets/images/minuse-off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions FE/public/assets/images/minuse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions FE/public/assets/images/pluse-off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions FE/public/assets/images/pluse.svg
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 FE/public/assets/images/thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion FE/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@
type="image/x-icon"
href="https://a0.muscache.com/airbnb/static/logotype_favicon-21cc8e6c6a2cca43f061d2dcabdf6e58.ico"
/>
<script
type="text/javascript"
src="//dapi.kakao.com/v2/maps/sdk.js?appkey=%REACT_APP_KAKAO_MAP_KEY%&libraries=services"
></script>
<title>에어비앤비</title>
</head>

<body>
<div id="root"></div>
<div id="modal"></div>
</body>
</html>
</html>
25 changes: 25 additions & 0 deletions FE/public/manifest.json
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"
}
15 changes: 15 additions & 0 deletions FE/scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

CONTAINER_NAME="airbnb-fe"
IMAGE_NAME="ghcr.io/jinan159/airbnb-fe:latest"

# remove prev image
sudo docker stop $CONTAINER_NAME
sudo docker rm $CONTAINER_NAME
sudo docker image rm $IMAGE_NAME

# pull latest image
sudo docker pull $IMAGE_NAME

# start container
sudo docker run -p 3000:3000 -d -it --name $CONTAINER_NAME $IMAGE_NAME
38 changes: 38 additions & 0 deletions FE/src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.App {
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
9 changes: 9 additions & 0 deletions FE/src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import App from './App';

test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});
1 change: 0 additions & 1 deletion FE/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { Routes, Route } from 'react-router-dom';

import { Hero } from 'components/Hero';
import { Home } from 'pages/Home';
import { Rooms } from 'pages/Rooms';
Expand Down
13 changes: 13 additions & 0 deletions FE/src/common/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ const GlobalStyle = createGlobalStyle`
top: 0;
left: 0;
}

input[type=range] {
-webkit-appearance: none;
background-color: transparent;
}

input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none;

a {
text-decoration: none;
color: #010101;
}
`;

export default GlobalStyle;
4 changes: 3 additions & 1 deletion FE/src/common/styled.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ declare module 'styled-components' {
md: '1.6rem';
lg: '1.8rem';
xl: '2rem';
xxl: '3.2rem';
xxl: '2.4rem';
xxxl: '3.2rem';
};

fontWeights: {
Expand All @@ -23,6 +24,7 @@ declare module 'styled-components' {
base: '2.3rem';
tall: '2.6rem';
taller: '2.9rem';
long: '3.5rem';
logo: '4.6rem';
};

Expand Down
Loading