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

[test-deploy] 테스트 배포 #1038

Merged
merged 18 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
844f633
[Fix] [GGFE-269] 모바일 키패드 정규식 패턴 수정
hyobb109 Sep 19, 2023
dfb58ef
[Fix] [GGFE-274] 관리자 피드백 완료 알림 보내기 설정
PHJoon Sep 19, 2023
d891dff
[Fix] [GGFE-269] 관리자 코인 수정 모바일 키패드 삭제
hyobb109 Sep 19, 2023
7ce22e7
[Feat] [GGFE-269] 점수 입력 모바일 숫자 키패드 추가
hyobb109 Sep 19, 2023
b409b18
[Feat] [GGFE-269] 코인 수정 내용 30자 제한
hyobb109 Sep 19, 2023
c85a6af
[Style] [GGFE-269] 코인내역 모달 정렬 수정
hyobb109 Sep 19, 2023
51af027
[Bug] [GGFE-261]출석모달 버그 수정
Sep 19, 2023
6a2cd90
Merge branch 'main' into GGFE-269-Admin-Coin-Edit
hyobb109 Sep 19, 2023
19e9188
Merge branch 'main' into GGFE-261-출석모달버그
parksangmin1543 Sep 19, 2023
e8556a3
Merge pull request #1033 from 42organization/GGFE-274-관리자-피드백완료-알림-토스…
PHJoon Sep 19, 2023
ef85d3c
[Feat] [GGFE-261] 출석모달 버그 수정
Sep 19, 2023
3fe9ef5
Merge branch 'main' into GGFE-261-출석모달버그
parksangmin1543 Sep 19, 2023
6b19294
Merge pull request #1035 from 42organization/GGFE-261-출석모달버그
parksangmin1543 Sep 19, 2023
5b14cfc
Merge branch 'main' into GGFE-269-Admin-Coin-Edit
hyobb109 Sep 19, 2023
dacc42e
[Fix] [GGFE-277] 페이지 가이드 노션 링크로 교체
hyobb109 Sep 19, 2023
1a05f70
Merge pull request #1034 from 42organization/GGFE-269-Admin-Coin-Edit
hyobb109 Sep 19, 2023
c663d6c
Merge branch 'main' into GGFE-277-Page-Guide
hyobb109 Sep 19, 2023
e5c74fe
Merge pull request #1037 from 42organization/GGFE-277-Page-Guide
yoouyeon Sep 19, 2023
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
2 changes: 1 addition & 1 deletion components/Layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function Footer() {
<div
onClick={() =>
window.open(
'https://github.com/42organization/42arcade.gg.client/wiki/42gg.kr--%ED%8E%98%EC%9D%B4%EC%A7%80-%EA%B0%80%EC%9D%B4%EB%93%9C'
'https://www.notion.so/bfbe7ad164d4450295e4978ce3121398?pvs=4'
)
}
>
Expand Down
10 changes: 8 additions & 2 deletions components/modal/ModalProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEffect } from 'react';
import { useQueryClient } from 'react-query';
import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil';
import { reloadMatchState } from 'utils/recoil/match';
import { modalState, modalTypeState } from 'utils/recoil/modal';
Expand All @@ -11,6 +12,7 @@ export default function ModalProvider() {
const [{ modalName, isAttended }, setModal] = useRecoilState(modalState);
const setReloadMatch = useSetRecoilState(reloadMatchState);
const modalType = useRecoilValue(modalTypeState);
const queryClient = useQueryClient();

useEffect(() => {
setModalOutsideScroll();
Expand All @@ -22,9 +24,13 @@ export default function ModalProvider() {
const closeModalHandler = (e: React.MouseEvent) => {
if (modalName?.split('-')[0] === 'FIXED') return;
if (e.target instanceof HTMLDivElement && e.target.id === 'modalOutside') {
if (modalName === 'MATCH-CANCEL') setReloadMatch(true);
else if (modalName === 'EVENT-ANNOUNCEMENT' && isAttended === false) {
if (modalName === 'MATCH-CANCEL') {
setReloadMatch(true);
} else if (modalName === 'EVENT-ANNOUNCEMENT' && isAttended === false) {
setModal({ modalName: 'EVENT-WELCOME' });
} else if (modalName === 'COIN-ANIMATION') {
queryClient.invalidateQueries('user');
setModal({ modalName: null });
} else {
setModal({ modalName: null });
}
Expand Down
8 changes: 8 additions & 0 deletions components/modal/admin/AdminFeedbackCheckModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useSetRecoilState } from 'recoil';
import { IoSend } from 'react-icons/io5';
import { instanceInManage } from 'utils/axios';
import { modalState } from 'utils/recoil/modal';
import { toastState } from 'utils/recoil/toast';
import styles from 'styles/admin/modal/AdminFeedbackCheck.module.scss';

interface IfeedbackProps {
Expand All @@ -16,6 +17,7 @@ export default function AdminFeedbackCheck({
isSolved,
}: IfeedbackProps) {
const setModal = useSetRecoilState(modalState);
const setSnackBar = useSetRecoilState(toastState);

const sendNotificationHandler = async (isSend: boolean) => {
try {
Expand All @@ -29,6 +31,12 @@ export default function AdminFeedbackCheck({
: '피드백이 반영되었습니다.',
// sendMail: isSend, todo: 슬랙으로 보내는 것으로 변경
});
setSnackBar({
toastName: 'noti user',
severity: 'success',
message: `알림이 성공적으로 전송되었습니다!`,
clicked: true,
});
setModal({ modalName: null });
} catch (e) {
console.error('SW03');
Expand Down
6 changes: 3 additions & 3 deletions components/modal/admin/AdminUserCoinModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { toastState } from 'utils/recoil/toast';
import styles from 'styles/admin/modal/AdminUserCoin.module.scss';

export default function AdminUserCoinModal(props: { intraId: string }) {
const MAX_LENGTH = 30;
const [currentCoin, setCurrentCoin] = useState<number>(0);
const [userCoinInfo, setUserCoinInfo] = useState<IUserCoin>({
intraId: props.intraId,
Expand Down Expand Up @@ -131,7 +132,8 @@ export default function AdminUserCoinModal(props: { intraId: string }) {
<input
className={styles.contentBlank}
name='content'
placeholder={'내용을 입력하세요'}
placeholder={'내용을 입력하세요(30자)'}
maxLength={MAX_LENGTH}
onChange={inputHandler}
/>
</div>
Expand All @@ -150,8 +152,6 @@ export default function AdminUserCoinModal(props: { intraId: string }) {
className={styles.coinBlank}
name='change'
type='number'
inputMode='numeric'
pattern='[0-9]*'
placeholder={'코인 지급(차감)액을 입력하세요'}
onChange={inputHandler}
/>
Expand Down
2 changes: 2 additions & 0 deletions components/modal/afterGame/InputScore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export default function InputScore({
id='myTeamScore'
name='myTeamScore'
type='number'
inputMode='numeric'
pattern='[0-9]*'
value={result.myTeamScore}
min={0}
max={2}
Expand Down
11 changes: 3 additions & 8 deletions components/modal/event/WelcomeModal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useState } from 'react';
import { useQueryClient } from 'react-query';
import { useSetRecoilState } from 'recoil';
import { Modal } from 'types/modalTypes';
import { instance } from 'utils/axios';
Expand All @@ -16,7 +15,6 @@ export default function WelcomeModal() {
const setModal = useSetRecoilState<Modal>(modalState);
const setError = useSetRecoilState(errorState);
const [buttonState, setButtonState] = useState(false);
const queryClient = useQueryClient();
const [isLoading, setIsLoading] = useState(false);
const content = {
title: 'Welcome!',
Expand All @@ -28,7 +26,6 @@ export default function WelcomeModal() {
try {
setIsLoading(true);
const res = await instance.post(`/pingpong/users/attendance`);
queryClient.invalidateQueries('user');
return res.data;
} catch (e: any) {
if (e.response.status === 409) {
Expand All @@ -43,16 +40,14 @@ export default function WelcomeModal() {
};

const openPageManual = () => {
window.open(
'https://github.com/42organization/42arcade.gg.client/wiki/42gg.kr--%ED%8E%98%EC%9D%B4%EC%A7%80-%EA%B0%80%EC%9D%B4%EB%93%9C'
);
window.open('https://www.notion.so/bfbe7ad164d4450295e4978ce3121398?pvs=4');
};

const openAttendanceCoin = async () => {
try {
setButtonState(true);
const updatedcoin = await postCoinHandler();
if (updatedcoin == null) return;
if (updatedcoin === null) return;
setModal({
modalName: 'COIN-ANIMATION',
CoinResult: {
Expand Down Expand Up @@ -92,7 +87,7 @@ export default function WelcomeModal() {
value='출석하기'
isLoading={isLoading}
/>
{buttonState && <CoinPopcon amount={8} coin={1} />}
{buttonState && <CoinPopcon amount={5} coin={0} />}
</ModalButtonContainer>
</div>
</div>
Expand Down
9 changes: 9 additions & 0 deletions components/modal/statChange/CoinChangeModal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Image from 'next/image';
import { useEffect } from 'react';
import { useQueryClient } from 'react-query';
import { useSetRecoilState } from 'recoil';
import { CoinResult } from 'types/coinTypes';
import { modalState } from 'utils/recoil/modal';
Expand All @@ -9,6 +11,13 @@ import styles from 'styles/modal/CoinChangeModal.module.scss';

export default function CoinChangeModal(coin: CoinResult) {
const setModal = useSetRecoilState(modalState);
const queryClient = useQueryClient();

useEffect(() => {
return () => {
queryClient.invalidateQueries('user');
};
}, []);

const closeModal = () => {
setModal({ modalName: null });
Expand Down
7 changes: 1 addition & 6 deletions components/modal/statChange/StatChangeModal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useEffect, useState } from 'react';
import { useQueryClient } from 'react-query';
import { useSetRecoilState } from 'recoil';
import { CoinResult } from 'types/coinTypes';
import { GameResult } from 'types/gameTypes';
Expand All @@ -9,15 +8,14 @@ import { reloadMatchState } from 'utils/recoil/match';
import { modalState } from 'utils/recoil/modal';
import ExpStat from 'components/modal/statChange/ExpStat';
import PppStat from 'components/modal/statChange/PppStat';
import useAxiosGet, { useMockAxiosGet } from 'hooks/useAxiosGet';
import useAxiosGet from 'hooks/useAxiosGet';
import styles from 'styles/modal/afterGame/StatChangeModal.module.scss';

export default function StatChangeModal({ gameId, mode }: Exp) {
const setModal = useSetRecoilState(modalState);
const setReloadMatch = useSetRecoilState(reloadMatchState);
const setError = useSetRecoilState(errorState);
const [stat, setStat] = useState<GameResult | undefined>();
const queryClient = useQueryClient();

const getExpHandler = useAxiosGet({
url: `/pingpong/games/${gameId}/result/${mode?.toLowerCase()}`,
Expand All @@ -28,9 +26,6 @@ export default function StatChangeModal({ gameId, mode }: Exp) {

useEffect(() => {
getExpHandler();
return () => {
queryClient.invalidateQueries('user');
};
}, []);

const closeModal = () => {
Expand Down
7 changes: 6 additions & 1 deletion styles/modal/store/CoinHistoryDetails.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

.data {
display: flex;
width: 100%;
padding: 0.5rem;
margin-bottom: 0.2rem;
font-size: 1rem;
Expand All @@ -16,15 +17,19 @@
.section1 {
display: flex;
align-items: center;
width: 85%;
.icon {
display: flex;
align-items: center;
width: 10%;
margin-right: 0.5rem;
align-items: center;
}
.content {
width: 90%;
.history {
color: black;
word-break: keep-all;
word-wrap: break-word;
}
.date {
font-size: 0.8rem;
Expand Down