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

[Fix/#243] 선호 시간 입력 다음 버튼 활성화 안되는 문제 해결 #244

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 0 additions & 42 deletions src/components/TestComponents.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/atomComponents/PasswordInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ function PasswordInput({ value, placeholder, passWordOnChange, page }: ValueProp
const [inputType, setInputType] = useState(true);

const changePasswordType = () => {
console.log(inputType);
setInputType((prev) => !prev);
};
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ function PriorityDropdown() {
handleDropdown(i);
};

// useEffect(
// () => {
// console.log(input_);
// },
// [input_],
// );
return (
<PriorityDropdownWrapper>
{scheduleList.map(
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ComponentTesting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function ComponentTesting() {

{buttonType.map((type, i) => {
return (
<Button key={i} typeState={type} onClick={() => console.log(`${type}`)}>
<Button key={i} typeState={type}>
<Text font={'button2'}>약속 생성하기</Text>
</Button>
);
Expand Down
4 changes: 0 additions & 4 deletions src/pages/OverallSchedule/OverallSchedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const OverallSchedule = () => {
const result = await overallScheduleApi(meetingId);
const { data } = result.data;
const uniqueData = [...new Set(data.totalUserNames)];
console.log(uniqueData);
setOverallScheduleData(data);
setMemberCount(data.memberCount);
setTotalUserNames(uniqueData);
Expand All @@ -61,9 +60,6 @@ const OverallSchedule = () => {
const formattedAvailableDateTimes =
overallScheduleData && getFormattedAvailableDateTimes(overallScheduleData);

console.log(timeSlotUserNames);
console.log(formattedAvailableDateTimes);
console.log(timeSlotUserNames);
return (
<OverallScheduleWrapper>
{overallScheduleData ? (
Expand Down
1 change: 0 additions & 1 deletion src/pages/OverallSchedule/components/Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const Column = (props: ColumnProps) => {
} = props;

const handleSlotClick = () => {
console.log(filterUserNames(userNames));
setTimeSlotUserName(userNames);
setClickedTimeSlot(rowIdx + timeSlot);
};
Expand Down
1 change: 0 additions & 1 deletion src/pages/OverallSchedule/components/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const Row = (props: RowProps) => {
if (objArray === undefined) return;
const targetObj = objArray.find((obj)=> obj.time === targetTime);
if(targetObj){
console.log(targetObj.userNames);
const temp=filterUserNames(targetObj.userNames);
return temp;
}
Expand Down
9 changes: 0 additions & 9 deletions src/pages/SteppingStone/SteppingLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ function SteppingLayout({ steppingType }: SteppingProps) {
);

const handlePopstate = () => {
alert('handle 작동');
navigate('/');
};

Expand All @@ -49,14 +48,6 @@ function SteppingLayout({ steppingType }: SteppingProps) {
};
}, []);

// useEffect(() => {
// history.pushState(null, '', location.href);
// console.log(location.href);
// window.onpopstate = function() {
// history.go(1);
// };
// }, []);

return (
<>
<SteppingWrapper>
Expand Down
19 changes: 7 additions & 12 deletions src/pages/createMeeting/components/useFunnel/SetTimes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ function SetTimes({ meetingInfo, setMeetingInfo, setStep }: FunnelProps) {
meetingInfo.preferTimes.length >= 2 ||
(meetingInfo.preferTimes[0].startTime !== '00:00' &&
meetingInfo.preferTimes[0].endTime !== '00:00')
)
) {
return true;
}

return false;
};
Expand Down Expand Up @@ -180,13 +181,7 @@ function SetTimes({ meetingInfo, setMeetingInfo, setStep }: FunnelProps) {

<StyledBtnSection>
<Button
typeState={
meetingInfo.preferTimes.length >= 1 &&
meetingInfo.preferTimes[0].startTime &&
meetingInfo.preferTimes[0].endTime !== '00:00'
? 'primaryActive'
: 'primaryDisabled'
}
typeState={buttonStateHandler() ? 'primaryActive' : 'primaryDisabled'}
onClick={
buttonStateHandler()
? () => {
Expand Down Expand Up @@ -271,12 +266,12 @@ const DropUpIcon = styled(DropUpIc)`

const DropDownContainer = styled.div`
position: absolute;
background-color: white;
margin-top: 4.8rem;
z-index: 2;
margin-top: 4.8rem;
border-bottom-left-radius: 0.8rem;
border-bottom-right-radius: 0.8rem;
background-color: white;
width: 15.1rem;
height: 14.4rem;
overflow: auto;
border-bottom-left-radius: 0.8rem;
border-bottom-right-radius: 0.8rem;
`;
11 changes: 0 additions & 11 deletions src/pages/selectSchedule/SelectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,12 @@ function SelectModal({ setShowModal }: ModalProps) {
const navigate = useNavigate();
const { auth, meetingId } = useParams();
const updateScheduleType = transformHostScheduleType(scheduleList);
console.log(updateScheduleType);
const updateMemberScheduleType = transformUserScheduleType(scheduleList, userName);
console.log(updateMemberScheduleType);

const postHostAvailableApi = async () => {
try {
if (meetingId && updateScheduleType) {
const { data } = await hostAvailableApi(meetingId, updateScheduleType);
console.log(data);
if (data.code === 201) {
setShowModal(false);
navigate(`/${auth}/schedule-complete/${meetingId}`);
Expand Down Expand Up @@ -80,14 +77,6 @@ function SelectModal({ setShowModal }: ModalProps) {
}
};

useEffect(
() => {
console.log(scheduleList);
},
[scheduleList],
);

// console.log(transformedScheduleList);
const finishConfirm = () => {
//여기에 api 연결하세요.
if (auth === 'host') {
Expand Down
5 changes: 2 additions & 3 deletions src/pages/selectSchedule/SelectSchedulePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ function SelectSchedulePage() {
priority: 0,
};
setScheduleList([...scheduleList, schedule]);
console.log(scheduleList);
};

const deleteDataList = (index: number) => {
Expand Down Expand Up @@ -269,9 +268,9 @@ const StyledBtnSection = styled.section`
bottom: 0;
align-items: end;
justify-content: center;
background: ${({ theme }) => theme.colors.dim_gradient};

margin-top:3rem;
margin-top: 3rem;
background: ${({ theme }) => theme.colors.dim_gradient};
padding-bottom: 2.9rem;

width: 100%;
Expand Down
1 change: 0 additions & 1 deletion src/pages/selectSchedule/components/DateSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ function DateSelect({ id, handleDate, availableDates, scheduleList }: PropTypes)

const [isOpen, setIsOpen] = useState(false);
const ref = useRef<HTMLDivElement>(null);
console.log(id);
useEffect(
() => {
const clickOutSide = (e: MouseEvent) => {
Expand Down
3 changes: 0 additions & 3 deletions src/pages/selectSchedule/utils/changeApiReq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ export const transformHostScheduleType = (
scheduleList: ScheduleStates[],
): (HostAvailableSchduleRequestType | null)[] => {
return scheduleList.map((item) => {
// const regexResult = item.date.match(/(\d+)월 (\d+)일 \((\S+)\)/);
// console.log(regexResult);

const matchedResult = item.date.match(/(\d+)월 (\d+)일 \((\S+)\)/);
if (!matchedResult) {
return null; // Handle the case when there is no match for the date pattern
Expand Down
3 changes: 1 addition & 2 deletions src/utils/apis/overallScheduleApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import { authClient, client } from './axios';

/** 가능 시간 입력 선택지 조회 api */
export const availbleScheduleOptionApi = (meetingId?: string) => {
const data= client.get<AvailableScheduleOptionResponse>(`/meeting/${meetingId}/schedule`);
console.log(data);
const data = client.get<AvailableScheduleOptionResponse>(`/meeting/${meetingId}/schedule`);
return client.get<AvailableScheduleOptionResponse>(`/meeting/${meetingId}/schedule`);
};

Expand Down
Loading