Skip to content

Commit 2b943d4

Browse files
committed
fix: 채팅방 로더 제거
1 parent 1ebd9c9 commit 2b943d4

File tree

4 files changed

+17
-21
lines changed

4 files changed

+17
-21
lines changed

dev-dist/sw.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ define(['./workbox-5357ef54'], (function (workbox) { 'use strict';
8282
"revision": "3ca0b8505b4bec776b69afdba2768812"
8383
}, {
8484
"url": "index.html",
85-
"revision": "0.mrbag484p7g"
85+
"revision": "0.1ds33gcjjgg"
8686
}], {});
8787
workbox.cleanupOutdatedCaches();
8888
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {

src/components/molecules/ChatRoomBannerItem.tsx

+11-17
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { useNavigate } from 'react-router-dom';
55
import { useEffect, useState } from 'react';
66
import BackBar from './BackBar';
77
import { walkingStatus } from '../../apis/walking';
8-
import Spinner from '../atoms/Spinner';
98

109
type ChatRoomBannerProps = {
1110
userinfo: {
@@ -22,7 +21,6 @@ const ChatRoomBannerItem = ({ userinfo }: ChatRoomBannerProps) => {
2221
// console.log('userinfo', userinfo);
2322
const { userImage, name } = userinfo;
2423
const [status, setStatus] = useState('');
25-
const [isgetData, setIsGetData] = useState(false);
2624
const [intervalId, setIntervalId] = useState<any>();
2725
// 채팅 목록에서 userId, matchingId, isOwner를 받아온다.
2826
const navigate = useNavigate();
@@ -32,7 +30,6 @@ const ChatRoomBannerItem = ({ userinfo }: ChatRoomBannerProps) => {
3230
walkingStatus(userinfo.matchingId)
3331
.then((res) => {
3432
setStatus(res.data.response.walkStatusField);
35-
setIsGetData(true);
3633
})
3734
.catch((_err) => {
3835
// alert(err.data.response);
@@ -53,7 +50,8 @@ const ChatRoomBannerItem = ({ userinfo }: ChatRoomBannerProps) => {
5350
};
5451
}, []);
5552
const mapbutton = () => {
56-
if (userinfo.walkType === 'READY') {
53+
// console.log('walkType', userinfo.walkType);
54+
if (userinfo.walkType === 'READY' || userinfo.walkType === null) {
5755
navigate('/walking', {
5856
state: {
5957
status: 'READY',
@@ -138,19 +136,15 @@ const ChatRoomBannerItem = ({ userinfo }: ChatRoomBannerProps) => {
138136
{/* {status ? ( */}
139137

140138
{userinfo.isDogOwner ? (
141-
<S.walkingButton disabled={!isgetData}>
142-
{isgetData ? (
143-
<S.ButtonWrapper>
144-
{status === '' ? (
145-
<h1 onClick={walkAck}>산책 허락하기</h1> // ready
146-
) : (
147-
//견주이면서 산책중이거나 산책이끝나면
148-
<h1 onClick={Ownermapbutton}>지도 보기</h1> // active
149-
)}
150-
</S.ButtonWrapper>
151-
) : (
152-
<Spinner />
153-
)}
139+
<S.walkingButton>
140+
<S.ButtonWrapper>
141+
{status === '' ? (
142+
<h1 onClick={walkAck}>산책 허락하기</h1> // ready
143+
) : (
144+
//견주이면서 산책중이거나 산책이끝나면
145+
<h1 onClick={Ownermapbutton}>지도 보기</h1> // active
146+
)}
147+
</S.ButtonWrapper>
154148
</S.walkingButton>
155149
) : (
156150
//알바생이면서 산책 대기중이면

src/components/molecules/ReviewModal.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default function ReviewModal({
104104
try {
105105
const response = await getNotReviewed();
106106
setData(response.data.response.walkStatusDTOS);
107-
console.log('미작성리뷰들', response);
107+
// console.log('미작성리뷰들', response);
108108

109109
// getNotificationById를 호출하는 Promise 배열을 생성합니다.
110110
const promises = response.data.response.walkStatusDTOS.map(
@@ -150,7 +150,7 @@ export default function ReviewModal({
150150
},
151151
});
152152
};
153-
console.log('data', notiData);
153+
// console.log('data', notiData);
154154

155155
return (
156156
<S.ModalContainer>

src/components/organisms/CurrentWalkingMap.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,13 @@ const CurrentWalkingMap = () => {
9090
state?.master || state?.isDogOwner
9191
? UserType.DOG_OWNER
9292
: UserType.PART_TIMER || 'PART_TIMER'; // TODO: user props로 받아오기
93+
// console.log('state', state.status);
9394
const [walkStatus, setWalkStatus] = useState(state.status);
9495
const buttonInnerText =
95-
WalkStatus !== null && walkStatus === WalkStatus.ACTIVATE
96+
WalkStatus && walkStatus === WalkStatus.ACTIVATE
9697
? '산책 종료하기'
9798
: '산책 시작하기';
99+
// console.log('walkStatus', walkStatus);
98100

99101
const { mutate: mutateWalkingStart } = useMutation({
100102
mutationFn: walkingStart,

0 commit comments

Comments
 (0)