From 15024e781e9ffa36e1aeba501632c6222ecdfa4e Mon Sep 17 00:00:00 2001 From: Yujun Kim Date: Thu, 12 Dec 2019 18:41:25 +0900 Subject: [PATCH 001/129] hotfix: redis deploy setting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * redis config 에서 port 를 number type으로 수정 * redis production 모드 .env 설정 수정 --- backend/.env.example | 2 +- backend/redis/config/dev.config.js | 4 ++-- backend/redis/config/prod.config.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/.env.example b/backend/.env.example index 2d2f04eb..b170cac4 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -127,5 +127,5 @@ REDIS_DEV_HOST=127.0.0.1 REDIS_PROD_CONTAINER_NAME=redis_dev REDIS_PROD_PORT=6379 -REDIS_PROD_HOST=127.0.0.1 +REDIS_PROD_HOST=redis ####################################################################################################################### \ No newline at end of file diff --git a/backend/redis/config/dev.config.js b/backend/redis/config/dev.config.js index 25b91377..55426fee 100644 --- a/backend/redis/config/dev.config.js +++ b/backend/redis/config/dev.config.js @@ -3,8 +3,8 @@ import dotenv from "dotenv"; dotenv.config(); const config = { - port: process.env.REDIS_DEV_PORT, - host: process.env.REDIS_DEV_HOST, + port: parseInt(process.env.REDIS_PROD_PORT_PORT, 10), + host: process.env.REDIS_PROD_PORT, }; export default config; diff --git a/backend/redis/config/prod.config.js b/backend/redis/config/prod.config.js index 25b91377..a0692eed 100644 --- a/backend/redis/config/prod.config.js +++ b/backend/redis/config/prod.config.js @@ -3,7 +3,7 @@ import dotenv from "dotenv"; dotenv.config(); const config = { - port: process.env.REDIS_DEV_PORT, + port: parseInt(process.env.REDIS_DEV_PORT, 10), host: process.env.REDIS_DEV_HOST, }; From fbb84b9b394c005ed89d53c82a5fea3253b80330 Mon Sep 17 00:00:00 2001 From: YujunKim Date: Thu, 12 Dec 2019 22:53:01 +0900 Subject: [PATCH 002/129] hotfix: redis env setting for deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * .env에 test mode 설정 추가 * production mode의 config 오타 수정 * configLoader를 함수에서 싱글톤 객체로 수정 --- backend/.env.example | 8 ++++++-- backend/redis/config/dev.config.js | 4 ++-- backend/redis/config/{configLoader.js => index.js} | 4 +++- backend/redis/config/test.config.js | 4 ++-- backend/redis/redisClient.js | 3 +-- 5 files changed, 14 insertions(+), 9 deletions(-) rename backend/redis/config/{configLoader.js => index.js} (87%) diff --git a/backend/.env.example b/backend/.env.example index b170cac4..1ecd1436 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -122,10 +122,14 @@ AUTH_PROD_TOKEN_AUDIENCE= ####################################################################################################################### # redis REDIS_DEV_CONTAINER_NAME=redis_dev -REDIS_DEV_PORT=6379 +REDIS_DEV_PORT=6380 REDIS_DEV_HOST=127.0.0.1 -REDIS_PROD_CONTAINER_NAME=redis_dev +REDIS_TEST_CONTAINER_NAME=redis_test +REDIS_TEST_PORT=6381 +REDIS_TEST1_HOST=127.0.0.1 + +REDIS_PROD_CONTAINER_NAME=redis REDIS_PROD_PORT=6379 REDIS_PROD_HOST=redis ####################################################################################################################### \ No newline at end of file diff --git a/backend/redis/config/dev.config.js b/backend/redis/config/dev.config.js index 55426fee..a0692eed 100644 --- a/backend/redis/config/dev.config.js +++ b/backend/redis/config/dev.config.js @@ -3,8 +3,8 @@ import dotenv from "dotenv"; dotenv.config(); const config = { - port: parseInt(process.env.REDIS_PROD_PORT_PORT, 10), - host: process.env.REDIS_PROD_PORT, + port: parseInt(process.env.REDIS_DEV_PORT, 10), + host: process.env.REDIS_DEV_HOST, }; export default config; diff --git a/backend/redis/config/configLoader.js b/backend/redis/config/index.js similarity index 87% rename from backend/redis/config/configLoader.js rename to backend/redis/config/index.js index 76b974ef..52eae70c 100644 --- a/backend/redis/config/configLoader.js +++ b/backend/redis/config/index.js @@ -17,4 +17,6 @@ function loadConfig() { return config; } -export default loadConfig; +const config = loadConfig(); + +export default config; diff --git a/backend/redis/config/test.config.js b/backend/redis/config/test.config.js index 25b91377..91d8d18c 100644 --- a/backend/redis/config/test.config.js +++ b/backend/redis/config/test.config.js @@ -3,8 +3,8 @@ import dotenv from "dotenv"; dotenv.config(); const config = { - port: process.env.REDIS_DEV_PORT, - host: process.env.REDIS_DEV_HOST, + port: parseInt(process.env.REDIS_TEST_PORT, 10), + host: process.env.REDIS_TEST_HOST, }; export default config; diff --git a/backend/redis/redisClient.js b/backend/redis/redisClient.js index acedd402..e72339e6 100644 --- a/backend/redis/redisClient.js +++ b/backend/redis/redisClient.js @@ -1,9 +1,8 @@ import redis from "redis"; import asyncRedis from "async-redis"; import getLogger from "../libs/logger.js"; -import loadConfig from "./config/configLoader.js"; +import config from "./config"; -const config = loadConfig(); const client = redis.createClient(config.port, config.host); const asyncRedisClient = asyncRedis.decorate(client); From 835d8f1c7f35bde5051af86a8b8767373613157a Mon Sep 17 00:00:00 2001 From: YujunKim Date: Thu, 12 Dec 2019 23:01:27 +0900 Subject: [PATCH 003/129] chore: reformat docker compose files --- backend/docker/docker-development.yml | 52 ++++----- backend/docker/docker-product.yml | 160 +++++++++++++------------- 2 files changed, 106 insertions(+), 106 deletions(-) diff --git a/backend/docker/docker-development.yml b/backend/docker/docker-development.yml index 1b5369b5..42939da0 100644 --- a/backend/docker/docker-development.yml +++ b/backend/docker/docker-development.yml @@ -1,31 +1,31 @@ version: "2.0" services: - mysql: - container_name: ${MYSQL_DEV_CONTAINER_NAME} - image: mysql - ports: - - ${MYSQL_DEV_PORT}:3306 - volumes: - - ${DOCKER_VOLUMNS_PATH}/${MYSQL_DEV_CONTAINER_NAME}:/var/lib/mysql - command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8 --collation-server=utf8_general_ci --log-bin-trust-function-creators=1 - environment: - - MYSQL_ROOT_PASSWORD=${MYSQL_DEV_ROOT_PASSWORD} - - MYSQL_DATABASE=${MYSQL_DEV_SCHEME} - - MYSQL_USER=${MYSQL_DEV_USER} - - MYSQL_PASSWORD=${MYSQL_DEV_PASSWORD} - networks: - - backend - redis: - container_name: ${REDIS_DEV_CONTAINER_NAME} - image: redis - ports: - - ${REDIS_DEV_PORT}:6379 - volumes: - - ${DOCKER_VOLUMNS_PATH}/${REDIS_DEV_CONTAINER_NAME}:/data - networks: - - backend + mysql: + container_name: ${MYSQL_DEV_CONTAINER_NAME} + image: mysql + ports: + - ${MYSQL_DEV_PORT}:3306 + volumes: + - ${DOCKER_VOLUMNS_PATH}/${MYSQL_DEV_CONTAINER_NAME}:/var/lib/mysql + command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8 --collation-server=utf8_general_ci --log-bin-trust-function-creators=1 + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_DEV_ROOT_PASSWORD} + - MYSQL_DATABASE=${MYSQL_DEV_SCHEME} + - MYSQL_USER=${MYSQL_DEV_USER} + - MYSQL_PASSWORD=${MYSQL_DEV_PASSWORD} + networks: + - backend + redis: + container_name: ${REDIS_DEV_CONTAINER_NAME} + image: redis + ports: + - ${REDIS_DEV_PORT}:6379 + volumes: + - ${DOCKER_VOLUMNS_PATH}/${REDIS_DEV_CONTAINER_NAME}:/data + networks: + - backend networks: - backend: - driver: "bridge" + backend: + driver: "bridge" diff --git a/backend/docker/docker-product.yml b/backend/docker/docker-product.yml index 73d7eb69..2fe43f96 100644 --- a/backend/docker/docker-product.yml +++ b/backend/docker/docker-product.yml @@ -1,89 +1,89 @@ version: "2.0" services: - express: - container_name: ${EXPRESS_PROD_CONTAINER_NAME} - image: ${NODE_IMAGE_NAME} - command: yarn pm2-runtime start ./build/express/app.js --watch - environment: - - NODE_ENV=production - # container 내부에서 DB container 를 접근하기위해 필요한 환경변수 - - IS_DOCKER_CONTAINER=true - volumes: - - ../build:/usr/src/app/build - tty: true - ports: - - 80:${EXPRESS_PROD_PORT} - networks: - - backend - links: - - mysql - - redis + express: + container_name: ${EXPRESS_PROD_CONTAINER_NAME} + image: ${NODE_IMAGE_NAME} + command: yarn pm2-runtime start ./build/express/app.js --watch + environment: + - NODE_ENV=production + # container 내부에서 DB container 를 접근하기위해 필요한 환경변수 + - IS_DOCKER_CONTAINER=true + volumes: + - ../build:/usr/src/app/build + tty: true + ports: + - 80:${EXPRESS_PROD_PORT} + networks: + - backend + links: + - mysql + - redis - socket_io: - container_name: ${SOCKET_IO_SERVER_PROD_CONTAINER_NAME} - image: ${NODE_IMAGE_NAME} - command: yarn pm2-runtime start ./build/socket_io_server/app.js --watch - environment: - - NODE_ENV=production - # container 내부에서 DB container 를 접근하기위해 필요한 환경변수 - - IS_DOCKER_CONTAINER=true - volumes: - - ../build:/usr/src/app/build - tty: true - ports: - - ${SOCKET_IO_SERVER_PROD_PORT}:${SOCKET_IO_SERVER_PROD_PORT} - networks: - - backend - links: - - mysql - - redis + socket_io: + container_name: ${SOCKET_IO_SERVER_PROD_CONTAINER_NAME} + image: ${NODE_IMAGE_NAME} + command: yarn pm2-runtime start ./build/socket_io_server/app.js --watch + environment: + - NODE_ENV=production + # container 내부에서 DB container 를 접근하기위해 필요한 환경변수 + - IS_DOCKER_CONTAINER=true + volumes: + - ../build:/usr/src/app/build + tty: true + ports: + - ${SOCKET_IO_SERVER_PROD_PORT}:${SOCKET_IO_SERVER_PROD_PORT} + networks: + - backend + links: + - mysql + - redis - graphQL_yoga: - container_name: ${GRAPHQL_YOGA_SERVER_PROD_CONTAINER_NAME} - image: ${NODE_IMAGE_NAME} - command: yarn pm2-runtime start ./build/graphQL/app.js --watch - environment: - - NODE_ENV=production - # container 내부에서 DB container 를 접근하기위해 필요한 환경변수 - - IS_DOCKER_CONTAINER=true - volumes: - - ../build:/usr/src/app/build - tty: true - ports: - - ${GRAPHQL_YOGA_SERVER_PROD_PORT}:${GRAPHQL_YOGA_SERVER_PROD_PORT} - networks: - - backend - links: - - mysql - - redis + graphQL_yoga: + container_name: ${GRAPHQL_YOGA_SERVER_PROD_CONTAINER_NAME} + image: ${NODE_IMAGE_NAME} + command: yarn pm2-runtime start ./build/graphQL/app.js --watch + environment: + - NODE_ENV=production + # container 내부에서 DB container 를 접근하기위해 필요한 환경변수 + - IS_DOCKER_CONTAINER=true + volumes: + - ../build:/usr/src/app/build + tty: true + ports: + - ${GRAPHQL_YOGA_SERVER_PROD_PORT}:${GRAPHQL_YOGA_SERVER_PROD_PORT} + networks: + - backend + links: + - mysql + - redis - mysql: - container_name: ${MYSQL_PROD_CONTAINER_NAME} - image: mysql - ports: - - ${MYSQL_PROD_PORT}:3306 - volumes: - - ${DOCKER_VOLUMNS_PATH}/${MYSQL_PROD_CONTAINER_NAME}:/var/lib/mysql - command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8 --collation-server=utf8_general_ci --log-bin-trust-function-creators=1 - environment: - - MYSQL_ROOT_PASSWORD=${MYSQL_PROD_ROOT_PASSWORD} - - MYSQL_DATABASE=${MYSQL_PROD_SCHEME} - - MYSQL_USER=${MYSQL_PROD_USER} - - MYSQL_PASSWORD=${MYSQL_PROD_PASSWORD} - networks: - - backend + mysql: + container_name: ${MYSQL_PROD_CONTAINER_NAME} + image: mysql + ports: + - ${MYSQL_PROD_PORT}:3306 + volumes: + - ${DOCKER_VOLUMNS_PATH}/${MYSQL_PROD_CONTAINER_NAME}:/var/lib/mysql + command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8 --collation-server=utf8_general_ci --log-bin-trust-function-creators=1 + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_PROD_ROOT_PASSWORD} + - MYSQL_DATABASE=${MYSQL_PROD_SCHEME} + - MYSQL_USER=${MYSQL_PROD_USER} + - MYSQL_PASSWORD=${MYSQL_PROD_PASSWORD} + networks: + - backend - redis: - container_name: ${REDIS_PROD_CONTAINER_NAME} - image: redis - ports: - - ${REDIS_PROD_PORT}:6379 - volumes: - - ${DOCKER_VOLUMNS_PATH}/${REDIS_PROD_CONTAINER_NAME}:/data - networks: - - backend + redis: + container_name: ${REDIS_PROD_CONTAINER_NAME} + image: redis + ports: + - ${REDIS_PROD_PORT}:6379 + volumes: + - ${DOCKER_VOLUMNS_PATH}/${REDIS_PROD_CONTAINER_NAME}:/data + networks: + - backend networks: - backend: - driver: "bridge" + backend: + driver: "bridge" From 2471c4a3f9542437e87543ee873d20b4e0763454 Mon Sep 17 00:00:00 2001 From: hkwon Date: Fri, 13 Dec 2019 17:35:04 +0900 Subject: [PATCH 004/129] =?UTF-8?q?feat:=20Guest=20=EC=9D=B4=EB=A6=84?= =?UTF-8?q?=EC=9D=84=20random=20=ED=95=98=EA=B2=8C=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=ED=95=98=EA=B8=B0=20=EC=9C=84=ED=95=9C=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adjectives.js: 형용사 array Animals.js: 동물이름 array --- .../src/components/GuestName/Adjective.js | 65 ++++++++++++ .../src/components/GuestName/Animals.js | 100 ++++++++++++++++++ 2 files changed, 165 insertions(+) create mode 100644 frontend/guest-app/src/components/GuestName/Adjective.js create mode 100644 frontend/guest-app/src/components/GuestName/Animals.js diff --git a/frontend/guest-app/src/components/GuestName/Adjective.js b/frontend/guest-app/src/components/GuestName/Adjective.js new file mode 100644 index 00000000..14da9314 --- /dev/null +++ b/frontend/guest-app/src/components/GuestName/Adjective.js @@ -0,0 +1,65 @@ +const Adjectives = [ + "춤추는", + "멋있는", + "차가운", + "뜨거운", + "호기심이 많은", + "귀여운", + "울부짖는", + "궁금한게 많은", + "노래하는", + "랩하는", + "화사한", + "맵시있는", + "요리하는", + "재미있는", + "큰 눈의", + "착한", + "정직한", + "조용한", + "즐거운", + "졸고있는", + "기쁜", + "벅찬", + "포근한", + "흐뭇한", + "상쾌한", + "짜릿한", + "시원한", + "반가운", + "후련한", + "살맛 나는", + "신바람 나는", + "아늑한", + "흥분되는", + "온화한", + "느긋한", + "끝내주는", + "괜찮은", + "쌈박한", + "정다운", + "그리운", + "자유로운", + "따사로운", + "감미로운", + "황홀한", + "상큼한", + "개념있는", + "지성적인", + "자상한", + "아리따운", + "여유있는", + "감정이 풍부한", + "활기찬", + "힘찬", + "생생한", + "의기 양양한", + "든든한", + "격렬한", + "당당한", + "팔팔한", + "엄청남", + "자신만만한", + "패기만만한", + "충만한", +]; diff --git a/frontend/guest-app/src/components/GuestName/Animals.js b/frontend/guest-app/src/components/GuestName/Animals.js new file mode 100644 index 00000000..effd65d1 --- /dev/null +++ b/frontend/guest-app/src/components/GuestName/Animals.js @@ -0,0 +1,100 @@ +const Animals = [ + "크롱", + "호눅스", + "부캠퍼", + "타노스", + "배트맨", + "아이언맨", + "헐크", + "토르", + "갈까마귀", + "갈라파고스라바해오라기", + "갈라파고스물개", + "갈라파고스붉은게", + "갈라파고스펭귄", + "갈매기", + "갈색여우원숭이", + "개구리", + "개미핥기", + "개코원숭이", + "거북", + "거위", + "고래", + "고래상어", + "고릴라", + "고슴도치", + "고양이", + "곰", + "공룡", + "공작", + "괭이갈매기", + "구관조", + "금붕어", + "기러기", + "기린", + "까마귀", + "까치", + "꿩", + "나무늘보", + "나비", + "낙타", + "너구리", + "노란눈썹펭귄", + "늑대", + "다람쥐", + "달마시안", + "달팽이", + "담비", + "딱다구리", + "맘모스", + "무당개구리", + "무당벌레", + "무스", + "물개", + "물총새", + "바다코끼리", + "바다표범", + "방울뱀", + "방울새", + "백로", + "북극여우", + "비단뱀", + "비둘기", + "비버", + "뻐꾸기", + "사막여우", + "사슴", + "사자", + "상어", + "소", + "소쩍새", + "송골매", + "수리부엉이", + "시조새", + "악어", + "앵무새", + "오리", + "올빼미", + "원숭이", + "장수하늘소", + "제비", + "족제비", + "진돗개", + "참새", + "청개구리", + "초록비단뱀", + "치타", + "캥거루", + "코끼리", + "코뿔소", + "코알라", + "타조", + "토끼", + "파랑새", + "펭귄", + "표범", + "퓨마", + "하마", + "흑표범", + "히말라야산양", +]; From c09c3b3976c5dbd749e6deef61745c358c3a9aef Mon Sep 17 00:00:00 2001 From: hkwon Date: Sat, 14 Dec 2019 11:32:43 +0900 Subject: [PATCH 005/129] =?UTF-8?q?fix:=20Poll=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=EC=9D=98=20pollDate=20=ED=95=84=EB=93=9C=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=EB=B0=A9=EC=8B=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (why) Poll이 open 되기 전까지는 pollDate 값이 null 이었음 null 인 값을 확인하지 않고 처리하다가 죽는 현상 발생 (해결방안) Poll 테이블 생성시 pollDate 필드에 현재시간 값을 넣어줌 --- backend/DB/queries/poll.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/DB/queries/poll.js b/backend/DB/queries/poll.js index 69333965..410a329c 100644 --- a/backend/DB/queries/poll.js +++ b/backend/DB/queries/poll.js @@ -64,13 +64,14 @@ export async function createPoll( pollType, selectionType, allowDuplication, - state, candidates ) { let transaction; let poll; let nItems; + const state = "standby"; + const pollDate = new Date(); try { // get transaction transaction = await sequelize.transaction(); @@ -84,6 +85,7 @@ export async function createPoll( selectionType, allowDuplication, state, + pollDate, }, {transaction} ); From 7d1006ca8ddd9c2e88094011035bbfab7312f4ed Mon Sep 17 00:00:00 2001 From: hkwon Date: Sat, 14 Dec 2019 11:35:07 +0900 Subject: [PATCH 006/129] =?UTF-8?q?fix:=20=EB=B3=B5=EC=88=98=EC=84=A0?= =?UTF-8?q?=ED=83=9D=EC=9D=B4=20=EC=95=88=EB=90=98=EB=8A=94=20=ED=88=AC?= =?UTF-8?q?=ED=91=9C=EC=9D=98=20DB=20=EC=9E=91=EC=97=85=EC=8B=9C=20transac?= =?UTF-8?q?tion=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit model Destroy() 함수는 하나의 인자 만 받는데, transaction을 두번째 인자에 넣어서 요청해서 죽는 문제 발생 --- backend/DB/queries/vote.js | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/DB/queries/vote.js b/backend/DB/queries/vote.js index ebdff291..c278729b 100644 --- a/backend/DB/queries/vote.js +++ b/backend/DB/queries/vote.js @@ -40,6 +40,7 @@ export async function addAndDelete(gId, candidateToAdd, candidateToDelete) { GuestId, CandidateId, }, + transaction, }); // commit From 6f128c58bbb482874206efa3fb4b4c4a88c15670 Mon Sep 17 00:00:00 2001 From: hkwon Date: Sat, 14 Dec 2019 11:37:05 +0900 Subject: [PATCH 007/129] =?UTF-8?q?fix:=20=ED=88=AC=ED=91=9C=EC=8B=9C=20DB?= =?UTF-8?q?=20transaction=EC=9D=84=20=EC=A0=81=EC=9A=A9=ED=95=A0=20?= =?UTF-8?q?=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20Handler=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Vote/voteOn.socketHandler.js | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/backend/socket_io_server/socketHandler/Vote/voteOn.socketHandler.js b/backend/socket_io_server/socketHandler/Vote/voteOn.socketHandler.js index 4b123b8c..f6606a56 100644 --- a/backend/socket_io_server/socketHandler/Vote/voteOn.socketHandler.js +++ b/backend/socket_io_server/socketHandler/Vote/voteOn.socketHandler.js @@ -17,20 +17,20 @@ const voteOnSocketHandler = async (data, emit) => { candidateToDelete, } = data; - // if (!allowDuplication && candidateToDelete) { - // await addAndDelete(GuestId, CandidateId, candidateToDelete); - // } else { - // await addVote({GuestId, CandidateId}); - // } - - await addVote({GuestId, CandidateId}); if (!allowDuplication && candidateToDelete) { - await deleteVoteBy({ - GuestId, - CandidateId: candidateToDelete, - }); + await addAndDelete(GuestId, CandidateId, candidateToDelete); + } else { + await addVote({GuestId, CandidateId}); } + // await addVote({GuestId, CandidateId}); + // if (!allowDuplication && candidateToDelete) { + // await deleteVoteBy({ + // GuestId, + // CandidateId: candidateToDelete, + // }); + // } + emit({ GuestId, poll, From a46b18fe451cdcf345e565474dbacd21c1c88515 Mon Sep 17 00:00:00 2001 From: hkwon Date: Sat, 14 Dec 2019 11:38:44 +0900 Subject: [PATCH 008/129] =?UTF-8?q?enhance:=20Poll=20state=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=EA=B0=92=EC=9D=80=20DB/query=20=EC=AA=BD=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=B2=98=EB=A6=AC=ED=95=98=EA=B2=8C=20=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../socketHandler/Poll/createPoll.socketHandler.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/socket_io_server/socketHandler/Poll/createPoll.socketHandler.js b/backend/socket_io_server/socketHandler/Poll/createPoll.socketHandler.js index 08d41cd7..7d29fbe2 100644 --- a/backend/socket_io_server/socketHandler/Poll/createPoll.socketHandler.js +++ b/backend/socket_io_server/socketHandler/Poll/createPoll.socketHandler.js @@ -11,16 +11,13 @@ const createPollSocketHandler = async (data, emit) => { candidates, } = data; - const state = "standby"; - const result = await createPoll( EventId, pollName, pollType, selectionType, allowDuplication, - state, - candidates, + candidates ); emit(result); From e78b31c8aae3f277d52ec3134f688baabbc8ea7e Mon Sep 17 00:00:00 2001 From: hkwon Date: Sat, 14 Dec 2019 11:39:15 +0900 Subject: [PATCH 009/129] =?UTF-8?q?fix:=20Modal=20=EB=AC=B8=EA=B5=AC=20?= =?UTF-8?q?=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/guest-app/src/components/LikeButton/UndoLikeModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/guest-app/src/components/LikeButton/UndoLikeModal.js b/frontend/guest-app/src/components/LikeButton/UndoLikeModal.js index da45d4d5..f35796fb 100644 --- a/frontend/guest-app/src/components/LikeButton/UndoLikeModal.js +++ b/frontend/guest-app/src/components/LikeButton/UndoLikeModal.js @@ -10,7 +10,7 @@ function UndoLikeConfirmModal({isOpened, onCancelClick, onConfirmClick}) { return ( - 좋아하기를 취소하기겠습니까? + 좋아하기를 취소하시겠습니까? From 997b7960a9b21920693d18aa868143c2c57471d2 Mon Sep 17 00:00:00 2001 From: hkwon Date: Sat, 14 Dec 2019 11:40:16 +0900 Subject: [PATCH 010/129] =?UTF-8?q?fix:=20=EB=B3=84=EC=A0=90=ED=88=AC?= =?UTF-8?q?=ED=91=9C=20=EC=9D=B4=ED=9B=84=20=EB=B3=84=EA=B0=AF=EC=88=98?= =?UTF-8?q?=EA=B0=80=20=EC=84=A0=ED=83=9D=EB=90=98=EB=8A=94=20=ED=98=84?= =?UTF-8?q?=EC=83=81=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/guest-app/src/components/Poll/ActiveRating.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/guest-app/src/components/Poll/ActiveRating.js b/frontend/guest-app/src/components/Poll/ActiveRating.js index 6deda330..143ef141 100644 --- a/frontend/guest-app/src/components/Poll/ActiveRating.js +++ b/frontend/guest-app/src/components/Poll/ActiveRating.js @@ -37,13 +37,14 @@ function ActiveRating({ onCancelRating, }) { return ( - + {!rated && "별 갯수로 평가해주세요"} {rated && `투표했음: ${ratingValue}점`} Date: Sat, 14 Dec 2019 11:42:15 +0900 Subject: [PATCH 011/129] =?UTF-8?q?enhance:=20=ED=88=AC=ED=91=9C=20css=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 종료버튼 secondary로 - 배경 하얀색으로 - N지선다 막대 그래프 색상을 회색으로 - 별점투표 테두리 하나 제거 등등 --- frontend/guest-app/src/components/Poll/Item.js | 4 ++-- frontend/guest-app/src/components/Poll/PollCard.js | 14 ++++++-------- frontend/host-app/src/components/Poll/Item.js | 4 ++-- frontend/host-app/src/components/Poll/PollCard.js | 14 ++++++++------ 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/frontend/guest-app/src/components/Poll/Item.js b/frontend/guest-app/src/components/Poll/Item.js index bc18d7b8..d0559d44 100644 --- a/frontend/guest-app/src/components/Poll/Item.js +++ b/frontend/guest-app/src/components/Poll/Item.js @@ -11,7 +11,7 @@ const RowWrapper = styled.div` width: 100%; height: 3rem; box-sizing: border-box; - background-color: #f8f9fa; /* Gray1 */ + background-color: #f1f3f5; /* Gray1 */ & + & { margin-top: 0.5rem; } @@ -40,7 +40,7 @@ const GraphWrapper = styled.div` top: 0; left: 0; background-color: ${props => - (props.firstPlace ? "yellow" : "#868e96")}; /* Gray6 */ + props.firstPlace ? "yellow" : "#adb5bd"}; /* Gray5 */ height: 100%; width: ${props => props.ratio}; box-sizing: border-box; diff --git a/frontend/guest-app/src/components/Poll/PollCard.js b/frontend/guest-app/src/components/Poll/PollCard.js index 9ada20b6..c9c87e25 100644 --- a/frontend/guest-app/src/components/Poll/PollCard.js +++ b/frontend/guest-app/src/components/Poll/PollCard.js @@ -10,12 +10,10 @@ const ColumnWrapper = styled.div` align-items: center; justify-content: flex-start; box-sizing: border-box; - border: 1px solid #adb5bd; /* Gray5 */ - // box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.25); + border: 1px solid #dee2e6; /* Gray3 */ width: 100%; - & + & { - margin-top: 1rem; - } + margin-top: 1rem; + background-color: white; `; const RowWrapper = styled.div` @@ -75,9 +73,9 @@ function PollCard(props) {
{state === "closed" && "(종료됨)"}
- {allowDuplication ? - `복수선택 | ${localePollDate}` : - `${localePollDate}`} + {allowDuplication + ? `복수선택 | ${localePollDate}` + : `${localePollDate}`} {pollType === "nItems" && ( - (props.firstPlace ? "yellow" : "#ced4da")}; /* Gray4 */ + props.firstPlace ? "yellow" : "#adb5bd"}; /* Gray5 */ height: 100%; width: ${props => props.ratio}; box-sizing: border-box; diff --git a/frontend/host-app/src/components/Poll/PollCard.js b/frontend/host-app/src/components/Poll/PollCard.js index 2d0372aa..9c08c915 100644 --- a/frontend/host-app/src/components/Poll/PollCard.js +++ b/frontend/host-app/src/components/Poll/PollCard.js @@ -14,9 +14,11 @@ const ColumnWrapper = styled.div` box-sizing: border-box; border: 1px solid #dee2e6; /* Gray3 */ width: 100%; - & + & { - margin-top: 1rem; + margin-top: 1rem; + button { + margin-bottom: 1rem; } + background-color: white; `; const RowWrapper = styled.div` @@ -91,9 +93,9 @@ function PollCard(props) {
{state === "closed" && "(종료됨)"}
- {allowDuplication ? - `복수선택 | ${localePollDate}` : - `${localePollDate}`} + {allowDuplication + ? `복수선택 | ${localePollDate}` + : `${localePollDate}`} {pollType === "nItems" && ( - ); -} - -function EditProfileModal({isOpened = false, onCancelClick, onSave}) { - return ( - - - 내 프로필 변경 - - - - - - - - - - ); -} - -export default EditProfileModal; diff --git a/frontend/guest-app/src/components/SideMenu/EditProfileButton.js b/frontend/guest-app/src/components/SideMenu/EditProfileButton.js deleted file mode 100644 index e5347516..00000000 --- a/frontend/guest-app/src/components/SideMenu/EditProfileButton.js +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react"; -import PersonIcon from "@material-ui/icons/Person.js"; -import useCommonModal from "../CommonComponent/CommonModal/useCommonModal.js"; -import SideMenuItem from "./SideMenuItem.js"; -import EditProfileModal from "../Modals/EditProfileModal.js"; - -function EditProfileButton() { - const modalState = useCommonModal(); - - return ( -
- } - itemText={"내 프로필 변경"} - onClick={modalState.openModal} - /> - -
- ); -} - -export default EditProfileButton; diff --git a/frontend/guest-app/src/components/SideMenu/SideMenuBody.js b/frontend/guest-app/src/components/SideMenu/SideMenuBody.js index 71f121c5..cc6b6bc4 100644 --- a/frontend/guest-app/src/components/SideMenu/SideMenuBody.js +++ b/frontend/guest-app/src/components/SideMenu/SideMenuBody.js @@ -1,10 +1,7 @@ import React from "react"; - import List from "@material-ui/core/List"; import Divider from "@material-ui/core/Divider"; -import EditProfileModal from "../Modals/EditProfileModal.js"; import useSideMenuStyles from "./UseSideMenuStyles.js"; -import EditProfileButton from "./EditProfileButton.js"; import MyQuestionButton from "./MyQuestionButton.js"; import LogoutButton from "./LogoutButton.js"; @@ -15,13 +12,9 @@ function SideMenuBody(props) {
- - - -
); } From acf71d7628fb78f86cbc7b82db9758486c9a04a9 Mon Sep 17 00:00:00 2001 From: Yujun Kim Date: Mon, 16 Dec 2019 17:49:49 +0900 Subject: [PATCH 022/129] =?UTF-8?q?fix:=20guest=20=EC=9D=B4=EB=A6=84?= =?UTF-8?q?=EC=9D=B4=20=EA=B3=A0=EC=A0=95=EB=90=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8A=94=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95=20#439?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit express 서버에서 guest 가 최초 접속시, 랜덤 이름을 정해주고, DB 에 넣도록 수정 guest-app에서는 접속시 graphQL로 쿼리한 guest정보로 질문 및 댓글 시 이름이 나오고 이름 입력 불가하도록 수정 squash before --- backend/DB/dummy/GuestName/Adjective.js | 64 ------------ backend/DB/dummy/GuestName/Animals.js | 97 ------------------- backend/DB/dummy/RandomGuestName/Adjective.js | 3 + backend/DB/dummy/RandomGuestName/Animals.js | 3 + backend/DB/dummy/RandomGuestName/index.js | 12 +++ backend/DB/queries/guest.js | 5 +- backend/express/routes/guest.js | 2 +- .../Question/NewQuestionInputDrawer.js | 1 + .../QuestionInputArea/UserInfoInput.js | 9 +- .../src/components/Reply/ReplierInfoInput.js | 8 +- .../src/components/Reply/ReplyInput.js | 9 +- 11 files changed, 31 insertions(+), 182 deletions(-) delete mode 100644 backend/DB/dummy/GuestName/Adjective.js delete mode 100644 backend/DB/dummy/GuestName/Animals.js create mode 100644 backend/DB/dummy/RandomGuestName/Adjective.js create mode 100644 backend/DB/dummy/RandomGuestName/Animals.js create mode 100644 backend/DB/dummy/RandomGuestName/index.js diff --git a/backend/DB/dummy/GuestName/Adjective.js b/backend/DB/dummy/GuestName/Adjective.js deleted file mode 100644 index 977f09fd..00000000 --- a/backend/DB/dummy/GuestName/Adjective.js +++ /dev/null @@ -1,64 +0,0 @@ -const Adjectives = [ - "춤추는", - "멋있는", - "차가운", - "뜨거운", - "호기심이 많은", - "귀여운", - "울부짖는", - "궁금한게 많은", - "노래하는", - "랩하는", - "화사한", - "맵시있는", - "요리하는", - "재미있는", - "큰 눈의", - "착한", - "정직한", - "조용한", - "즐거운", - "졸고있는", - "기쁜", - "벅찬", - "포근한", - "흐뭇한", - "상쾌한", - "시원한", - "반가운", - "후련한", - "살맛 나는", - "신바람 나는", - "아늑한", - "흥분되는", - "온화한", - "느긋한", - "끝내주는", - "괜찮은", - "쌈박한", - "정다운", - "그리운", - "자유로운", - "따사로운", - "감미로운", - "황홀한", - "상큼한", - "개념있는", - "지성적인", - "자상한", - "아리따운", - "여유있는", - "감정이 풍부한", - "활기찬", - "힘찬", - "생생한", - "의기 양양한", - "든든한", - "격렬한", - "당당한", - "팔팔한", - "엄청남", - "자신만만한", - "패기만만한", - "충만한", -]; diff --git a/backend/DB/dummy/GuestName/Animals.js b/backend/DB/dummy/GuestName/Animals.js deleted file mode 100644 index a3e6453b..00000000 --- a/backend/DB/dummy/GuestName/Animals.js +++ /dev/null @@ -1,97 +0,0 @@ -const Animals = [ - "크롱", - "호눅스", - "부캠퍼", - "타노스", - "배트맨", - "아이언맨", - "헐크", - "토르", - "갈까마귀", - "돌고래", - "해오라기", - "갈매기", - "갈색여우원숭이", - "개구리", - "개미핥기", - "개코원숭이", - "거북", - "거위", - "고래", - "고래상어", - "고릴라", - "고슴도치", - "고양이", - "곰", - "공룡", - "공작", - "괭이갈매기", - "구관조", - "금붕어", - "기러기", - "기린", - "까마귀", - "까치", - "꿩", - "나무늘보", - "나비", - "낙타", - "너구리", - "노란눈썹펭귄", - "늑대", - "다람쥐", - "달마시안", - "달팽이", - "담비", - "딱다구리", - "맘모스", - "무당개구리", - "무당벌레", - "무스", - "물개", - "물총새", - "바다코끼리", - "바다표범", - "방울뱀", - "방울새", - "백로", - "북극여우", - "비단뱀", - "비둘기", - "비버", - "뻐꾸기", - "사막여우", - "사슴", - "사자", - "상어", - "소", - "소쩍새", - "송골매", - "수리부엉이", - "시조새", - "악어", - "앵무새", - "오리", - "올빼미", - "원숭이", - "장수하늘소", - "제비", - "족제비", - "진돗개", - "참새", - "청개구리", - "초록비단뱀", - "치타", - "캥거루", - "코끼리", - "코뿔소", - "코알라", - "타조", - "토끼", - "파랑새", - "펭귄", - "표범", - "퓨마", - "하마", - "흑표범", -]; diff --git a/backend/DB/dummy/RandomGuestName/Adjective.js b/backend/DB/dummy/RandomGuestName/Adjective.js new file mode 100644 index 00000000..f643616e --- /dev/null +++ b/backend/DB/dummy/RandomGuestName/Adjective.js @@ -0,0 +1,3 @@ +const Adjectives = ["춤추는", "멋있는", "차가운", "뜨거운", "호기심이 많은", "귀여운", "울부짖는", "궁금한게 많은", "노래하는", "랩하는", "화사한", "맵시있는", "요리하는", "재미있는", "큰 눈의", "착한", "정직한", "조용한", "즐거운", "졸고있는", "기쁜", "벅찬", "포근한", "흐뭇한", "상쾌한", "시원한", "반가운", "후련한", "살맛 나는", "신바람 나는", "아늑한", "흥분되는", "온화한", "느긋한", "끝내주는", "괜찮은", "쌈박한", "정다운", "그리운", "자유로운", "따사로운", "감미로운", "황홀한", "상큼한", "개념있는", "지성적인", "자상한", "아리따운", "여유있는", "감정이 풍부한", "활기찬", "힘찬", "생생한", "의기 양양한", "든든한", "격렬한", "당당한", "팔팔한", "엄청남", "자신만만한", "패기만만한", "충만한"]; + +export default Adjectives; diff --git a/backend/DB/dummy/RandomGuestName/Animals.js b/backend/DB/dummy/RandomGuestName/Animals.js new file mode 100644 index 00000000..5067fea8 --- /dev/null +++ b/backend/DB/dummy/RandomGuestName/Animals.js @@ -0,0 +1,3 @@ +const Animals = ["크롱", "호눅스", "부캠퍼", "타노스", "배트맨", "아이언맨", "헐크", "토르", "갈까마귀", "돌고래", "해오라기", "갈매기", "갈색여우원숭이", "개구리", "개미핥기", "개코원숭이", "거북", "거위", "고래", "고래상어", "고릴라", "고슴도치", "고양이", "곰", "공룡", "공작", "괭이갈매기", "구관조", "금붕어", "기러기", "기린", "까마귀", "까치", "꿩", "나무늘보", "나비", "낙타", "너구리", "노란눈썹펭귄", "늑대", "다람쥐", "달마시안", "달팽이", "담비", "딱다구리", "맘모스", "무당개구리", "무당벌레", "무스", "물개", "물총새", "바다코끼리", "바다표범", "방울뱀", "방울새", "백로", "북극여우", "비단뱀", "비둘기", "비버", "뻐꾸기", "사막여우", "사슴", "사자", "상어", "소", "소쩍새", "송골매", "수리부엉이", "시조새", "악어", "앵무새", "오리", "올빼미", "원숭이", "장수하늘소", "제비", "족제비", "진돗개", "참새", "청개구리", "초록비단뱀", "치타", "캥거루", "코끼리", "코뿔소", "코알라", "타조", "토끼", "파랑새", "펭귄", "표범", "퓨마", "하마", "흑표범"]; + +export default Animals; diff --git a/backend/DB/dummy/RandomGuestName/index.js b/backend/DB/dummy/RandomGuestName/index.js new file mode 100644 index 00000000..43fcfe5c --- /dev/null +++ b/backend/DB/dummy/RandomGuestName/index.js @@ -0,0 +1,12 @@ +import faker from "faker"; +import Adjectives from "./Adjective.js"; +import Animals from "./Animals.js"; + +function getRandomGuestName() { + const adjective = faker.random.arrayElement(Adjectives); + const animal = faker.random.arrayElement(Animals); + + return `${adjective} ${animal}`; +} + +export default getRandomGuestName; diff --git a/backend/DB/queries/guest.js b/backend/DB/queries/guest.js index b66d5964..f11ff510 100644 --- a/backend/DB/queries/guest.js +++ b/backend/DB/queries/guest.js @@ -1,5 +1,6 @@ import uuidv1 from "uuid/v1"; import models from "../models"; +import getRandomGuestName from "../dummy/RandomGuestName"; const Guest = models.Guest; @@ -10,9 +11,9 @@ async function findGuestBySid(guestSid) { return result; } -async function createGuest(name, eventId) { +async function createGuest(eventId) { const guest = await Guest.create({ - name, + name: getRandomGuestName(), EventId: eventId, guestSid: uuidv1(), isAnonymous: 1, diff --git a/backend/express/routes/guest.js b/backend/express/routes/guest.js index 108940c9..f17a3406 100644 --- a/backend/express/routes/guest.js +++ b/backend/express/routes/guest.js @@ -29,7 +29,7 @@ router.get("/:path", guestAuthenticate(), async (req, res, next) => { try { const path = req.params.path; const eventId = await pathToCode(path); - const guest = await createGuest("Anonymous", eventId); + const guest = await createGuest(eventId); const accessToken = generateAccessToken(guest.guestSid, "guest"); res.cookie(cookieName, accessToken, { expires: getTokenExpired(24), diff --git a/frontend/guest-app/src/components/Question/NewQuestionInputDrawer.js b/frontend/guest-app/src/components/Question/NewQuestionInputDrawer.js index cbe37f58..54486815 100644 --- a/frontend/guest-app/src/components/Question/NewQuestionInputDrawer.js +++ b/frontend/guest-app/src/components/Question/NewQuestionInputDrawer.js @@ -35,6 +35,7 @@ function NewQuestionInputDrawer({userNameRef, questionRef, toggleReducer}) { onConfirm: onConfirmNewQuestion, userNameRef, questionRef, + initialUserName: guest.name, }; return ; diff --git a/frontend/guest-app/src/components/Question/QuestionInputArea/UserInfoInput.js b/frontend/guest-app/src/components/Question/QuestionInputArea/UserInfoInput.js index f4760a21..399d7d02 100644 --- a/frontend/guest-app/src/components/Question/QuestionInputArea/UserInfoInput.js +++ b/frontend/guest-app/src/components/Question/QuestionInputArea/UserInfoInput.js @@ -6,19 +6,14 @@ import QuestionUserNameInput from "./QuestionUserNameInput.js"; function UserInfoInput(props) { const {userNameRef, initialUserName = ""} = props; - const {state, setState} = useStringState(initialUserName); - - const onUserNameChange = e => { - setState(e.target.value); - }; + const {state} = useStringState(initialUserName); return ( <> - + ); diff --git a/frontend/guest-app/src/components/Reply/ReplierInfoInput.js b/frontend/guest-app/src/components/Reply/ReplierInfoInput.js index db4cfaaf..06ec7c0a 100644 --- a/frontend/guest-app/src/components/Reply/ReplierInfoInput.js +++ b/frontend/guest-app/src/components/Reply/ReplierInfoInput.js @@ -12,11 +12,7 @@ const TextFieldStyle = styled(TextField)({ }); function UserInfoInput(props) { - const {userNameRef, userName, setUserName} = props; - - const onUserNameChange = e => { - setUserName(e.target.value); - }; + const {userNameRef, userName} = props; return ( <> @@ -24,7 +20,6 @@ function UserInfoInput(props) { @@ -34,7 +29,6 @@ function UserInfoInput(props) { UserInfoInput.propTypes = { userNameRef: PropTypes.any, userName: PropTypes.string, - setUserName: PropTypes.func, }; export default UserInfoInput; diff --git a/frontend/guest-app/src/components/Reply/ReplyInput.js b/frontend/guest-app/src/components/Reply/ReplyInput.js index 124b6c1f..8756ae3e 100644 --- a/frontend/guest-app/src/components/Reply/ReplyInput.js +++ b/frontend/guest-app/src/components/Reply/ReplyInput.js @@ -1,4 +1,4 @@ -import React, {useState} from "react"; +import React, {useContext, useState} from "react"; import styled from "styled-components"; import PropTypes from "prop-types"; import {Button} from "@material-ui/core"; @@ -6,6 +6,7 @@ import Grid from "@material-ui/core/Grid"; import Divider from "@material-ui/core/Divider"; import ReplyContentInput from "./ReplyContentInput"; import ReplierInfoInput from "./ReplierInfoInput"; +import {GuestGlobalContext} from "../../libs/guestGlobalContext.js"; const FlexedCenterDiv = styled.div` display: flex; @@ -22,7 +23,8 @@ const FlexedSpaceBetweenDiv = styled.div` function ReplyInput(props) { const {onConfirm, userNameRef, questionRef, confirmButtonText} = props; const [replyContent, setReplyContent] = useState(""); - const [userName, setUserName] = useState(""); + const {guest} = useContext(GuestGlobalContext); + const [userName] = useState(guest.name); return ( @@ -31,13 +33,12 @@ function ReplyInput(props) { content={replyContent} setContent={setReplyContent} /> - + From 1de7528666ba2cfe5205dc09c53d95798d4dd83a Mon Sep 17 00:00:00 2001 From: Tei Date: Mon, 16 Dec 2019 18:16:28 +0900 Subject: [PATCH 023/129] =?UTF-8?q?refactor:=20Skeleton=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EB=93=A4=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skeleton 폴더를 따로 만들어 분리함 --- frontend/host-app/src/App/App.js | 9 ++---- .../src/components/ComponentsStyle.js | 16 +--------- frontend/host-app/src/components/Content.js | 2 +- .../src/components/Skeleton/AppSkeleton.js | 15 +++++++++ .../components/Skeleton/SkeletonContent.js | 27 ++++++++++++++++ .../src/components/Skeleton/SkeletonStyle.js | 31 +++++++++++++++++++ .../src/components/Skeleton/SkeletonTitle.js | 12 +++++++ 7 files changed, 89 insertions(+), 23 deletions(-) create mode 100644 frontend/host-app/src/components/Skeleton/AppSkeleton.js create mode 100644 frontend/host-app/src/components/Skeleton/SkeletonContent.js create mode 100644 frontend/host-app/src/components/Skeleton/SkeletonStyle.js create mode 100644 frontend/host-app/src/components/Skeleton/SkeletonTitle.js diff --git a/frontend/host-app/src/App/App.js b/frontend/host-app/src/App/App.js index 74a675a0..6e80dd5c 100644 --- a/frontend/host-app/src/App/App.js +++ b/frontend/host-app/src/App/App.js @@ -1,5 +1,4 @@ import React, {useState} from "react"; -import {Skeleton} from "@material-ui/lab"; import {useQuery} from "@apollo/react-hooks"; import "./App.css"; import Header from "../components/Header"; @@ -10,8 +9,7 @@ import {HostProvider} from "../libs/hostContext"; import {getEventsByHost} from "../libs/gql"; import EmptyContent from "../components/EmptyContent"; import {socketClient} from "../libs/socket.io-Client-wrapper"; -import SkeletonContent from "../components/SkeletonContent"; -import SkeletonTitle from "../components/SkeletionTitle"; +import AppSkeleton from "../components/Skeleton/AppSkeleton"; function App() { const modal = false; @@ -21,10 +19,7 @@ function App() { if (loading) { return ( - - - - + ); } else if (error) { return

error-page...

; diff --git a/frontend/host-app/src/components/ComponentsStyle.js b/frontend/host-app/src/components/ComponentsStyle.js index efcb7e2d..449f6fb9 100644 --- a/frontend/host-app/src/components/ComponentsStyle.js +++ b/frontend/host-app/src/components/ComponentsStyle.js @@ -121,20 +121,7 @@ const ModerationStyle = styled.div` } `; -const SkeletonColumnStyle = styled.div` - display: flex; - flex-direction: column; - flex: 1; - justify-content: flex-start; - align-items: center; - border-radius: 8px; - min-width: "20rem"; - height: "100%"; - box-sizing: border-box; - & + & { - margin-left: 8px; - } -`; + const FooterStyle = styled.div` width: 90%; @@ -150,7 +137,6 @@ export { ContentStyle, QuestionStyle, FooterStyle, - SkeletonColumnStyle, ModerationStyle, FooterBox, }; diff --git a/frontend/host-app/src/components/Content.js b/frontend/host-app/src/components/Content.js index 4d5a3cd3..71d6849c 100644 --- a/frontend/host-app/src/components/Content.js +++ b/frontend/host-app/src/components/Content.js @@ -5,7 +5,7 @@ import useQueryQuestions from "../libs/useQueryQuestions"; import {HostContext} from "../libs/hostContext"; import {ContentStyle} from "./ComponentsStyle"; import QuestionsReducer from "./Questions/QuestionReducer"; -import SkeletonContent from "./SkeletonContent"; +import SkeletonContent from "./Skeleton/SkeletonContent"; import useSocketHandler from "./useSocketHandler"; diff --git a/frontend/host-app/src/components/Skeleton/AppSkeleton.js b/frontend/host-app/src/components/Skeleton/AppSkeleton.js new file mode 100644 index 00000000..d7bc5b76 --- /dev/null +++ b/frontend/host-app/src/components/Skeleton/AppSkeleton.js @@ -0,0 +1,15 @@ +import React from "react"; +import {Skeleton} from "@material-ui/lab"; +import SkeletonTitle from "./SkeletonTitle.js"; +import SkeletonContent from "./SkeletonContent.js"; + +function AppSkeleton() { + return ( + + + + + ); +} + +export default AppSkeleton; diff --git a/frontend/host-app/src/components/Skeleton/SkeletonContent.js b/frontend/host-app/src/components/Skeleton/SkeletonContent.js new file mode 100644 index 00000000..5245be91 --- /dev/null +++ b/frontend/host-app/src/components/Skeleton/SkeletonContent.js @@ -0,0 +1,27 @@ +import {Skeleton} from "@material-ui/lab"; +import React from "react"; +import {SkeletonContentStyle, SkeletonColumnStyle} from "./SkeletonStyle"; + +function SkeletonContent() { + return ( + + + + + + + + + + + + + + + + + + ); +} + +export default SkeletonContent; diff --git a/frontend/host-app/src/components/Skeleton/SkeletonStyle.js b/frontend/host-app/src/components/Skeleton/SkeletonStyle.js new file mode 100644 index 00000000..bf081a8e --- /dev/null +++ b/frontend/host-app/src/components/Skeleton/SkeletonStyle.js @@ -0,0 +1,31 @@ +import styled from "styled-components"; + +const SkeletonColumnStyle = styled.div` + display: flex; + flex-direction: column; + flex: 1; + justify-content: flex-start; + align-items: center; + border-radius: 8px; + min-width: "20rem"; + height: "100%"; + box-sizing: border-box; + & + & { + margin-left: 8px; + } +`; + +const SkeletonContentStyle = styled.div` + display: flex; + flex-direction: row; + flex: 1; + overflow: auto; + justify-content: left; + align-items: flex-start; + padding: 4px 8px; + overflow-x: auto; + flex-wrap: nowrap; +`; + +export {SkeletonColumnStyle, SkeletonContentStyle}; + diff --git a/frontend/host-app/src/components/Skeleton/SkeletonTitle.js b/frontend/host-app/src/components/Skeleton/SkeletonTitle.js new file mode 100644 index 00000000..082f4c85 --- /dev/null +++ b/frontend/host-app/src/components/Skeleton/SkeletonTitle.js @@ -0,0 +1,12 @@ +import {Skeleton} from "@material-ui/lab"; +import React from "react"; + +function SkeletonTitle() { + return (<> + + + + ); +} + +export default SkeletonTitle; From 73f3854f2d01f63b0f33e2082e29df01c6876f5d Mon Sep 17 00:00:00 2001 From: hkwon Date: Mon, 16 Dec 2019 18:19:21 +0900 Subject: [PATCH 024/129] =?UTF-8?q?refactor:=20find=EB=A5=BC=20filter?= =?UTF-8?q?=EB=A1=9C=20=EB=8B=A4=EC=8B=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/guest-app/src/components/Poll/PollContainer.js | 2 ++ frontend/guest-app/src/components/Poll/PollReducer.js | 2 +- frontend/host-app/src/components/Poll/PollContainer.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/guest-app/src/components/Poll/PollContainer.js b/frontend/guest-app/src/components/Poll/PollContainer.js index 1fe2ff52..33e7b977 100644 --- a/frontend/guest-app/src/components/Poll/PollContainer.js +++ b/frontend/guest-app/src/components/Poll/PollContainer.js @@ -95,6 +95,7 @@ function PollContainer({data, GuestId}) { useSocket("vote/on", res => { if (res.status === "error") { + console.log("vote/on ERROR"); return; } // 하나의 브라우저에서 여러개의 tab으로 guest들을 생성한 경우, @@ -114,6 +115,7 @@ function PollContainer({data, GuestId}) { useSocket("vote/off", res => { if (res.status === "error") { + console.log("vote/off ERROR"); return; } // 하나의 브라우저에서 여러개의 tab으로 guest들을 생성한 경우, diff --git a/frontend/guest-app/src/components/Poll/PollReducer.js b/frontend/guest-app/src/components/Poll/PollReducer.js index bd3e4b64..0b3b2815 100644 --- a/frontend/guest-app/src/components/Poll/PollReducer.js +++ b/frontend/guest-app/src/components/Poll/PollReducer.js @@ -131,7 +131,7 @@ export default function reducer(polls, action) { const {pollId} = action; if (pollId) { - thePoll = {...polls.find(poll => poll.id === pollId)}; + thePoll = polls.filter(poll => poll.id === pollId)[0]; } switch (action.type) { diff --git a/frontend/host-app/src/components/Poll/PollContainer.js b/frontend/host-app/src/components/Poll/PollContainer.js index 8e665989..b1f78c3d 100644 --- a/frontend/host-app/src/components/Poll/PollContainer.js +++ b/frontend/host-app/src/components/Poll/PollContainer.js @@ -22,7 +22,7 @@ function reducer(polls, action) { const {pollId} = action; if (pollId) { - thePoll = {...polls.find(poll => poll.id === pollId)}; + thePoll = polls.filter(poll => poll.id === pollId)[0]; } switch (action.type) { From 14976eb7934db6c4c0738fb5082605fb5bbcbbcd Mon Sep 17 00:00:00 2001 From: Tei Date: Mon, 16 Dec 2019 18:22:47 +0900 Subject: [PATCH 025/129] =?UTF-8?q?chore:=20=EB=8D=94=EB=AF=B8=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit delete: frontend/host-app/src/components/Questions/QuestionDummyData.js mod: Header.js 에서 하드코딩된 "홍" 제거 --- frontend/host-app/src/components/Header.js | 3 +- .../components/Questions/QuestionDummyData.js | 64 ------------------- 2 files changed, 1 insertion(+), 66 deletions(-) delete mode 100644 frontend/host-app/src/components/Questions/QuestionDummyData.js diff --git a/frontend/host-app/src/components/Header.js b/frontend/host-app/src/components/Header.js index 0069dd42..211dc7ea 100644 --- a/frontend/host-app/src/components/Header.js +++ b/frontend/host-app/src/components/Header.js @@ -21,7 +21,6 @@ const useStyles = makeStyles(() => ({ function Header() { const [settingModalOpen, handleOpen, handleClose] = useModal(); const classes = useStyles(); - const userName = "홍"; return ( @@ -35,7 +34,7 @@ function Header() { handleClose={handleClose} /> )} - + diff --git a/frontend/host-app/src/components/Questions/QuestionDummyData.js b/frontend/host-app/src/components/Questions/QuestionDummyData.js deleted file mode 100644 index 7389de60..00000000 --- a/frontend/host-app/src/components/Questions/QuestionDummyData.js +++ /dev/null @@ -1,64 +0,0 @@ -function DummyData() { - return [ - { - id: 0, - userName: "오랑캐1", - date: new Date(), - question: "오늘 마스터 클래스 좋네요", - isAnonymous: false, - status: "moderation", - isStared: false, - }, { - id: 1, - userName: "오랑캐2", - date: new Date(), - question: "회의실이 부족해요", - isAnonymous: false, - status: "moderation", - isStared: false, - }, { - id: 2, - userName: "오랑캐3", - date: new Date(), - question: - "이 질문은 정말 길어서 끝까지 읽을 수도 없는 정도로 어마어마 무지무지하게 긴 질문입니다 저보다 더 긴 질문을 하시(중략...)", - isAnonymous: false, - status: "newQuestion", - isStared: false, - }, { - id: 3, - userName: "오랑캐4", - date: new Date(), - question: "짧은 질문입니다", - isAnonymous: false, - status: "newQuestion", - isStared: false, - }, { - id: 4, - userName: "Anonymous", - date: new Date(), - question: "점심 뭐먹나요", - isAnonymous: true, - status: "popularQuestion", - isStared: false, - }, { - id: 5, - userName: "Anonymous", - date: new Date(), - question: "해장국이요", - isAnonymous: true, - status: "popularQuestion", - isStared: false, - }, { - id: 6, - userName: "Anonymous", - date: new Date(), - question: "오늘의 질문을 종료합니다", - isAnonymous: true, - status: "completeQuestion", - isStared: false, - }, - ]; -} - -export default DummyData; From 625a6fc9c83287ec523b10dc5fe83c98bdde995c Mon Sep 17 00:00:00 2001 From: Yujun Kim Date: Mon, 16 Dec 2019 18:26:03 +0900 Subject: [PATCH 026/129] =?UTF-8?q?chore:=20guest-app=EC=9D=98=20LogoutMod?= =?UTF-8?q?al=20=EB=B2=84=ED=8A=BC=EC=9D=84=20=EA=B3=B5=ED=86=B5=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/Modals/LogoutModal.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/frontend/guest-app/src/components/Modals/LogoutModal.js b/frontend/guest-app/src/components/Modals/LogoutModal.js index e3bed7dc..29ddf481 100644 --- a/frontend/guest-app/src/components/Modals/LogoutModal.js +++ b/frontend/guest-app/src/components/Modals/LogoutModal.js @@ -1,9 +1,10 @@ import React from "react"; import {Grid} from "@material-ui/core"; -import Button from "@material-ui/core/Button"; import Typography from "@material-ui/core/Typography"; import Box from "@material-ui/core/Box"; import CommonModal from "../CommonComponent/CommonModal/CommonModal.js"; +import CancelButton from "../CommonComponent/CommonButtons/CancelButton.js"; +import ConfirmButton from "../CommonComponent/CommonButtons/ConfirmButton.js"; function LogOutModal({isOpened = false, onCancelClick, onLogout}) { return ( @@ -11,17 +12,8 @@ function LogOutModal({isOpened = false, onCancelClick, onLogout}) { 로그아웃 하시겠습니까? - - - + +
); From 1e19c8b58ba080a8ee44b5b47aaf2ec448cb3203 Mon Sep 17 00:00:00 2001 From: Yujun Kim Date: Mon, 16 Dec 2019 18:28:37 +0900 Subject: [PATCH 027/129] =?UTF-8?q?refactoring:=20EmojiInsertButton=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EB=B6=84=EB=A6=AC,=20?= =?UTF-8?q?=ED=95=84=ED=84=B0=EB=A7=81=20=EC=A1=B0=EA=B1=B4=20=ED=95=A8?= =?UTF-8?q?=EC=88=98=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/Emoji/EmojiArea.js | 36 +++++++++---------- .../src/components/Emoji/EmojiInsertButton.js | 15 ++++++++ .../src/components/Emoji/EmojiPickerModal.js | 21 ++++++----- 3 files changed, 41 insertions(+), 31 deletions(-) create mode 100644 frontend/guest-app/src/components/Emoji/EmojiInsertButton.js diff --git a/frontend/guest-app/src/components/Emoji/EmojiArea.js b/frontend/guest-app/src/components/Emoji/EmojiArea.js index 67208d11..fdf23d28 100644 --- a/frontend/guest-app/src/components/Emoji/EmojiArea.js +++ b/frontend/guest-app/src/components/Emoji/EmojiArea.js @@ -1,12 +1,11 @@ import React, {useContext} from "react"; import styled from "styled-components"; -import IconButton from "@material-ui/core/IconButton"; -import InsertEmoticonOutlinedIcon from "@material-ui/icons/InsertEmoticonOutlined"; import EmojiInstance from "./EmojiInstance"; import EmojiPickerModal from "./EmojiPickerModal"; import useCommonModal from "../CommonComponent/CommonModal/useCommonModal"; import {socketClient} from "../../libs/socketIoClientProvider.js"; import {GuestGlobalContext} from "../../libs/guestGlobalContext.js"; +import EmojiInsertButton from "./EmojiInsertButton.js"; const RowWrapper = styled.div` display: flex; @@ -22,16 +21,6 @@ const RowWrapper = styled.div` } `; -function EmojiInsertButton(props) { - const {onClick} = props; - - return ( - - - - ); -} - const unPickEmoji = (emojis, name, guestGlobal, QuestionId) => { const {event, guest} = guestGlobal; @@ -70,6 +59,10 @@ const pickEmoji = (emojis, name, guestGlobal, QuestionId) => { }); }; +function isIncludeSameEmoji(emojis, name) { + return emojis.filter(x => x.name === name).length > 0; +} + function EmojiArea(props) { const {emojis, id: QuestionId} = props; const guestGlobal = useContext(GuestGlobalContext); @@ -91,7 +84,7 @@ function EmojiArea(props) { EventId: event.id, }; - if (emojis.filter(x => x.name === name).length) { + if (isIncludeSameEmoji(emojis, name)) { return; } @@ -102,15 +95,18 @@ function EmojiArea(props) { return ( {emojis.map((emj, index) => ( - + ))} - {emojiPickerModal.isOpened && ( - - )} + ); } diff --git a/frontend/guest-app/src/components/Emoji/EmojiInsertButton.js b/frontend/guest-app/src/components/Emoji/EmojiInsertButton.js new file mode 100644 index 00000000..e33b18a4 --- /dev/null +++ b/frontend/guest-app/src/components/Emoji/EmojiInsertButton.js @@ -0,0 +1,15 @@ +import IconButton from "@material-ui/core/IconButton"; +import InsertEmoticonOutlinedIcon from "@material-ui/icons/InsertEmoticonOutlined.js"; +import React from "react"; + +function EmojiInsertButton(props) { + const {onClick} = props; + + return ( + + + + ); +} + +export default EmojiInsertButton; diff --git a/frontend/guest-app/src/components/Emoji/EmojiPickerModal.js b/frontend/guest-app/src/components/Emoji/EmojiPickerModal.js index 85b7045f..9a78d7eb 100644 --- a/frontend/guest-app/src/components/Emoji/EmojiPickerModal.js +++ b/frontend/guest-app/src/components/Emoji/EmojiPickerModal.js @@ -4,17 +4,16 @@ import "emoji-mart/css/emoji-mart.css"; import {Picker} from "emoji-mart"; import customEmojis from "./CustomEmojis"; -function EmojiPickerModal({onClose, onSelect}) { - return ( - - - - ); +function EmojiPickerModal({open, onClose, onSelect}) { + return + + ; } + export default EmojiPickerModal; From 3f1b475a147d7c1d44b7994685f1a6296885c15f Mon Sep 17 00:00:00 2001 From: Yujun Kim Date: Mon, 16 Dec 2019 18:29:50 +0900 Subject: [PATCH 028/129] =?UTF-8?q?chore:=20=EC=82=AC=EC=9A=A9=ED=95=98?= =?UTF-8?q?=EC=A7=80=20useLikeButton=20=ED=9B=85=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/LikeButton/useLikeButton.js | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 frontend/guest-app/src/components/LikeButton/useLikeButton.js diff --git a/frontend/guest-app/src/components/LikeButton/useLikeButton.js b/frontend/guest-app/src/components/LikeButton/useLikeButton.js deleted file mode 100644 index 38f9486d..00000000 --- a/frontend/guest-app/src/components/LikeButton/useLikeButton.js +++ /dev/null @@ -1,18 +0,0 @@ -import {useState} from "react"; - -function useLikeButton(initialState = {isLikeClicked: false, likeCount: 0}) { - const [likeState, setLikeState] = useState(initialState); - - const onLike = () => - setLikeState({likeCount: likeState.likeCount + 1, isLikeClicked: true}); - - const onUndoLike = () => - setLikeState({ - likeCount: likeState.likeCount - 1, - isLikeClicked: false, - }); - - return {...likeState, onLike, onUndoLike}; -} - -export default useLikeButton; From e7fd1b9d268a702381864803c379022c21780ce1 Mon Sep 17 00:00:00 2001 From: Tei Date: Mon, 16 Dec 2019 18:45:12 +0900 Subject: [PATCH 029/129] =?UTF-8?q?refactor:=20=EB=8B=A8=EC=9C=84=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=ED=8F=B4=EB=8D=94?= =?UTF-8?q?=EB=A1=9C=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename: Content -> EventMonitor 단위 컴포넌트들 폴더를 생성하여 각각의 폴더로 이동 --- frontend/guest-app/src/libs/serviceWorker.js | 4 +-- frontend/host-app/src/App/App.js | 8 +++--- .../components/{ => EventMonitor}/Column.js | 6 ++--- .../{ => EventMonitor}/ColumnFooter.js | 2 +- .../{ => EventMonitor}/ComponentsStyle.js | 0 .../{ => EventMonitor}/EmptyContent.js | 6 ++--- .../EventMonitor.js} | 14 +++++----- .../{ => EventMonitor/Title}/RadioTitle.js | 2 +- .../{ => EventMonitor/Title}/SwitchTitle.js | 6 ++--- .../{ => EventMonitor/Title}/Title.js | 2 +- .../{ => EventMonitor}/useSocketHandler.js | 4 +-- .../src/components/{ => Header}/Header.js | 4 +-- .../{ => Header}/HeaderAccountAvata.js | 2 +- .../{ => Header}/HeaderConfigAvata.js | 0 .../{ => Skeleton}/SkeletionTitle.js | 0 .../src/components/SkeletonContent.js | 27 ------------------- frontend/host-app/src/libs/serviceWorker.js | 4 +-- frontend/main-app/src/libs/serviceWorker.js | 4 +-- 18 files changed, 34 insertions(+), 61 deletions(-) rename frontend/host-app/src/components/{ => EventMonitor}/Column.js (87%) rename frontend/host-app/src/components/{ => EventMonitor}/ColumnFooter.js (92%) rename frontend/host-app/src/components/{ => EventMonitor}/ComponentsStyle.js (100%) rename frontend/host-app/src/components/{ => EventMonitor}/EmptyContent.js (84%) rename frontend/host-app/src/components/{Content.js => EventMonitor/EventMonitor.js} (86%) rename frontend/host-app/src/components/{ => EventMonitor/Title}/RadioTitle.js (95%) rename frontend/host-app/src/components/{ => EventMonitor/Title}/SwitchTitle.js (83%) rename frontend/host-app/src/components/{ => EventMonitor/Title}/Title.js (96%) rename frontend/host-app/src/components/{ => EventMonitor}/useSocketHandler.js (84%) rename frontend/host-app/src/components/{ => Header}/Header.js (89%) rename frontend/host-app/src/components/{ => Header}/HeaderAccountAvata.js (93%) rename frontend/host-app/src/components/{ => Header}/HeaderConfigAvata.js (100%) rename frontend/host-app/src/components/{ => Skeleton}/SkeletionTitle.js (100%) delete mode 100644 frontend/host-app/src/components/SkeletonContent.js diff --git a/frontend/guest-app/src/libs/serviceWorker.js b/frontend/guest-app/src/libs/serviceWorker.js index 1f9e9f45..e1e465e2 100644 --- a/frontend/guest-app/src/libs/serviceWorker.js +++ b/frontend/guest-app/src/libs/serviceWorker.js @@ -83,8 +83,8 @@ function registerValidSW(swUrl, config) { } else { // At this point, everything has been precached. // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log("Content is cached for offline use."); + // "EventMonitor is cached for offline use." message. + console.log("EventMonitor is cached for offline use."); // Execute callback if (config && config.onSuccess) { diff --git a/frontend/host-app/src/App/App.js b/frontend/host-app/src/App/App.js index 6e80dd5c..ecf4440b 100644 --- a/frontend/host-app/src/App/App.js +++ b/frontend/host-app/src/App/App.js @@ -1,13 +1,13 @@ import React, {useState} from "react"; import {useQuery} from "@apollo/react-hooks"; import "./App.css"; -import Header from "../components/Header"; +import Header from "../components/Header/Header"; import Nav from "../components/Nav"; -import Content from "../components/Content"; +import EventMonitor from "../components/EventMonitor/EventMonitor"; import NewPollModal from "../components/Poll/NewPollModal"; import {HostProvider} from "../libs/hostContext"; import {getEventsByHost} from "../libs/gql"; -import EmptyContent from "../components/EmptyContent"; +import EmptyContent from "../components/EventMonitor/EmptyContent"; import {socketClient} from "../libs/socket.io-Client-wrapper"; import AppSkeleton from "../components/Skeleton/AppSkeleton"; @@ -46,7 +46,7 @@ function App() {