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/#294] 우선순위 입력 페이지에서 가능시간 입력 페이지로 되돌아가면 우선순위 초기화 #295

Merged
merged 46 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
887f8e9
fix: 네비게이션 모달 z-index변경
ljh0608 Jul 29, 2024
b83bb5e
fix: x버튼 네비게이션바에 정상적으로 보이도록
ljh0608 Jul 29, 2024
453786a
fix: 시간입력 로직에서 뒤로가기했을 때 우선순위 초기화
ljh0608 Jul 29, 2024
3288a6d
feat: 우선순위 드롭다운 날짜/시간순으로 정렬
ljh0608 Jul 29, 2024
9c0ba8f
refactor: 중복코드 개선
ljh0608 Jul 29, 2024
6a94a11
refactor: 뷰 중복코드 개선
ljh0608 Jul 29, 2024
6e833aa
fix: toSorted 배포상 이슈로 slice메소드와 sort메소드 사용으로 변경
ljh0608 Jul 29, 2024
00fc5d5
refactor: useEffect 내부 함수 분리
ljh0608 Aug 7, 2024
badc10e
fix: 우선순위 초기화 로직 개선
ljh0608 Aug 8, 2024
e74fe5e
chore: resetHandle useEffect 중복 로직 삭제
ljh0608 Aug 10, 2024
c5f1297
feat: recoil-persist 적용
simeunseo Jul 27, 2024
a4afb65
feat: Timetable 컴포넌트에 slotUnit prop추가하여 적용
simeunseo Jul 27, 2024
82fdfc8
feat: 우선순위 뷰에서 선택된 슬롯에는 border 제거
simeunseo Jul 27, 2024
b70d477
feat: 우선순위 숫자 표시 스타일링
simeunseo Jul 27, 2024
59b11d4
fix: SlotTitle 색상 변경
simeunseo Jul 27, 2024
da1d46d
fix: slot의 스타일링에 대한 로직을 Column 컴포넌트로 이동
simeunseo Jul 27, 2024
5b2463d
docs: slot 스타일링 관련 주석
simeunseo Jul 27, 2024
662ddba
feat: 우선순위 subtitle 추가
simeunseo Jul 27, 2024
5ee72ab
fix: SlotTitle에만 slotUnit prop 내려주기
simeunseo Jul 27, 2024
ed9af49
chore: 주석 수정
simeunseo Jul 27, 2024
4307dc7
feat: 맨 첫번째 Slot은 그라디언트 적용
simeunseo Jul 27, 2024
c7d3c94
feat: react-lottie 설치 및 stylelint-config-prettier 의존성삭제
simeunseo Aug 4, 2024
69d9f7b
feat: useModalState 구현
simeunseo Aug 4, 2024
e7c38c3
feat: 온보딩 로티 삽입
simeunseo Aug 4, 2024
fa61c71
feat: CTA 부자연스러움 관련 처리
simeunseo Aug 4, 2024
3f7f222
fix: 로티와 싱크 맞추기 위한 수정
simeunseo Aug 4, 2024
b042fec
fix: 모달 background position fixed로 변경
simeunseo Aug 4, 2024
35a654d
fix: atom, molecules, timetable Components를 모두 common 폴더로 이동
simeunseo Aug 4, 2024
927697a
fix: 시간 입력 margin-bottom 위치 수정
simeunseo Aug 4, 2024
b5064a9
fix: OverallSchedule에도 margin-bottom 추가
simeunseo Aug 4, 2024
7db8a09
fix: macro 삭제
simeunseo Aug 8, 2024
44887d0
fix: stylelintrc에서 stylelint-config-prettier 삭제
simeunseo Aug 8, 2024
9b704a0
feat: 방 정보입력 프로그레스바 구현
ljh0608 Jul 28, 2024
cd73519
fix: 선호시간대 입력 페이지 삭제
simeunseo Jul 19, 2024
60a6245
rebase merge
ljh0608 Aug 7, 2024
2d9b3c8
충돌 해결
ljh0608 Aug 7, 2024
7b154d0
feat: Timetable 컴포넌트에 slotUnit prop추가하여 적용
simeunseo Jul 27, 2024
e70cdf9
feat: 우선순위 숫자 표시 스타일링
simeunseo Jul 27, 2024
71da64f
fix: slot의 스타일링에 대한 로직을 Column 컴포넌트로 이동
simeunseo Jul 27, 2024
ff52666
docs: slot 스타일링 관련 주석
simeunseo Jul 27, 2024
5f5824f
fix: SlotTitle에만 slotUnit prop 내려주기
simeunseo Jul 27, 2024
34c2f0e
fix: 헤더와 프로그레스바 간격추가, transition추가
ljh0608 Aug 7, 2024
06968a9
chore: 사용하지 않는 변수 삭제
ljh0608 Aug 7, 2024
0278b8e
test: test commit
ljh0608 Aug 10, 2024
26288e2
chore: PR build 실패시 PR닫는로직 제거
ljh0608 Aug 10, 2024
b760a34
fix: merge develop
simeunseo Aug 11, 2024
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
4 changes: 2 additions & 2 deletions src/components/moleculesComponents/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ function Header({ position, setFunnelStep }: HeaderProps) {
</HeaderSection>
{isNaviOpen ? (
<NavigationSection>
<NavigationContainer>
<IconContainer onClick={() => setIsNaviOpen((prev) => !prev)}>
<ExitIc />
</IconContainer>
<NavigationContainer>
<Navigation navigationOptions={navigationOptions}/>
</NavigationContainer>
</NavigationSection>
Expand Down Expand Up @@ -160,7 +160,7 @@ const NavigationSection = styled.section`
position: absolute;
top: 0;
right: 0;
z-index: 1;
z-index: 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

z-index를 계속 하드코딩 하게 되면 앞으로도 모달, 바텀시트 등등 z-index가 중요한 상황에서 예상치 못한 결과가 생길 수 있으니
사이드바의 z-index를 늘리는 것보다, swiper에 기본적으로 적용되어 있는 z-index: 1을 없애는게 낫지 않을까?라는 생각이 들었어요.

그래서 swiper에 왜 z-index: 1이 적용되어 있는지를 좀 알아봤는데, 해당 swiper 라이브러리 코드를 보니 z-index 부분에 대해 Fix of Webkit flickering 이라는 주석이 써있더라구요. 관련 PR이 없어서 더 자세히 알아보지는 못했어요.
일단 제가 swiper에서 z-index를 0으로 맞추고 크롬과 사파리에서 모두 확인해보았으나 문제는 없었는데... swiper 개발자가 z-index를 넣은데는 이유가 있을테니까요..ㅎㅎ

그래서 결론은, 우선 이렇게 해두되 이번 스프린트 끝내고나서 z-index를 상수로 빼서 관리를 하는 등 위계를 잘 정리해보면 좋을 것 같습니다.
서비스 사이즈가 작다보니 z-index가 쓰이는 곳도 그리 많지 않은 것 같아서요. 헤더, 사이드바, 드롭다운, 모달, 바텀시트 등..? 각각에 맞게 z-index를 상수화하면 덜 복잡하게 관리할 수 있을 것 같습니다.

결론만 확인해주시면 될거같긴한데 제 생각 과정을 공유드려봤읍니다!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋네요 z-index를 상수화한다는 생각은 못해봤는데 공부를 해봐야겠네요 !
이런식의 상수화를 말씀하시는게 맞으신가요??
완전 좋지만 그전에 필요없는 z-index사용한 부분을 개선해보면 좋겠네요!!

swiper의 z-index:1이 적용되어있는 이유는 Webkit의 깜빡임 문제때문이라고 하네요. webkit은 마크업을 기반으로 웹브라우저를 만드는데 기반을 제공하는 오픈소스 프레임워크라고 합니다. 저도 찾아보며 공부할 수 있어서 좋았습니다!

갑자기 궁금해서 z-index에 대해서도 조금 더 공부해보니

  1. position: relative, absolute는 일반적인 요소보다 더 높은 쌓임맥락을 가집니다.
  2. 자식의 z-index값은 부모요소 내부에서만 의미가 있습니다.
  3. 같은 포지션, 같은 z-index일 경우 나중에 쓰여진 HTML 소스가 더 높이 위치합니다.

라고 이해하고 사용중입니다.

감사합니다~

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 첨부해주신 링크에 잘 설명되어있네요!! 제가 처음에 생각한 방법은 아래처럼 단순한 상수화였는데, 어떤 방법이 적절할지는 저희 서비스내에 zIndex가 필요한 부분을 정리해보고 결정하면 좋을 것같아요. zIndex가 필요하지 않은데 쓰이고있는 것들이 있다면 정리하구요.

export zIndex = {
  Sidebar: 1,
  Modal: 2,
  ...

background-color: rgba(0, 0, 0, 0.7);
width: 100%;
height: 100vh;
Expand Down
20 changes: 19 additions & 1 deletion src/pages/selectSchedule/components/SelectScheduleTable.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from 'react';
import { useEffect, useState } from 'react';

import Timetable from 'components/timetableComponents/Timetable';
import { ColumnStructure, TimetableStructure } from 'components/timetableComponents/types';
Expand All @@ -8,6 +8,7 @@ import PriorityCta from './selectPriority/PriorityCta';
import PriorityDropdown from './selectPriority/PriorityDropdown';
import SelectionColumn from './selectTimeSlot/SelectionColumn';
import TimeSlotCta from './selectTimeSlot/TimeSlotCta';

import { useScheduleStepContext } from '../contexts/useScheduleStepContext';
import { SelectContext, SelectedSlotType } from '../contexts/useSelectContext';
import { StepSlotsType, StepbottomItemsType } from '../types';
Expand Down Expand Up @@ -39,6 +40,23 @@ function SelectScheduleTable({ timeSlots, availableDates }: TimetableStructure)
};
const bottomItem = bottomItems[scheduleStep];

useEffect(
() => {
if (scheduleStep === 'selectTimeSlot') {
const resetPriorities = () => {
const updatedSchedules = Object.entries(selectedSlots).map((schedule) => {
if (schedule[1] && typeof schedule[1] === 'object') {
return [schedule[0], { ...schedule[1], priority: 0 }];
}
return schedule;
});
setSelectedSlots(Object.fromEntries(updatedSchedules));
};
resetPriorities();
}
},
[scheduleStep],
);
return (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 회의때도 얘기했지만 다시 정리해서 의견 남기겠습니다!

  1. useEffect의 사용 관련
    React 공식문서 중 You might not need a effect 문서를 참고했습니다. 문서의 첫단락에 보면 useEffect가 필요하지 않은 대표적인 경우 중 첫번째로 "렌더링을 위해 데이터를 변환하는 데 Effect가 필요하지 않습니다." 라고 언급하고 있습니다. 그리고 이 경우에 대한 예시로, props 또는 state에 따라 state 업데이트하기 부분과 props 변경시 모든 state 초기화 부분이 저희가 맞딱들인 문제와 상당히 유사하다고 느껴집니다. 저희도 scheduleStep이라는 state가 특정 값으로 변경되었을 때, selectedSlots라는 상태를 변경시키고 싶은 상황이니까요.
    이 문서들에서 해당 상황에 useEffect를 쓰지 말라고 하는 이유는, useEffect가 렌더링이 완료된 후 발생하기 때문입니다. 저희 상황에 적용하면, priority들이 초기화되지 않은 상태로 렌더링이 됐다가, useEffect를 통해 priority를 모두 0으로 만들고나서 시간표를 다시 렌더링해야하기 때문입니다. 비효율적이죠...

react developer tools로 직접 확인해보니 역시 렌더링이 두번 일어나고 있었습니다.
useEffect 사용 X(초기화 기능 X)

2024-08-04.3.31.32.mov

useEffect 사용 O(초기화 기능 O)

2024-08-04.3.31.56.mov

제 생각에 selectedSlots라는 하나의 state에서, (가능 시간 입력 페이지에서 사용되는) 선택된 날짜 데이터와 (우선순위 입력 페이지에서 사용되는) priority 데이터가 같이 관리되고 있다는 구조적인 문제에서 원인을 따져볼 수도 있을 것 같습니다. 가능 시간 입력 시간표와 우선순위 입력 시간표가 아예 다른 컴포넌트로 분리되어있다면, 가능 시간 입력 시간표에서는 priority값을 사용할 필요가 없고, 우선순위 입력 시간표가 렌더링 될 때 priority가 항상 0으로 초기화되게끔 한다면 해결이 될 수도 있지 않을까....
하지만 가능시간입력->우선순위입력이 유기적으로 연결되어있고 시간표 컴포넌트를 재사용하는 이상, 이 부분을 건드는건 오히려 문제가 더 커질 것 같습니다.

  1. useEffect를 쓰지 않고 header에서 setState를 하는 방법
    그래서 useEffect를 쓰지 않는 방법으로 header에서 초기화 처리를 하는 방법을 제시해주셨습니다. 모든 페이지에 공통으로 삽입되는 헤더에 특정 페이지만을 위한 의존성을 삽입하는게 맞지 않다고 저희가 입을 모았었는데요. 제가 실제로 header에 넣는 방법으로 코드를 짜보니 일단 useEffect없이 해결이 되는 건 맞습니다. 그런데 header에서 초기화를 하려면 selectedSlots에 대한 context를 주입받아야하는데 그건 구조상 불가능합니다. 그래서 역시 이 방안은 기각입니다

  2. 결론
    현재 이렇게 useEffect를 사용하는 로직이 불필요한 리렌더링을 일으키는 안티패턴임은 분명합니다. 그러나 이로인해 직접적인 문제가 발생하는 것은 아니며, 구조상 useEffect를 배제하는게 쉽지 않기 때문에 다음에 다시 고민해보는 것도 괜찮을 것 같다는 의견입니다.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추가로, entries메소드 사용으로 인한 번거로움을 언급해주셨는데 다음과 같이 작성하면 어떨까요?

 const resetPriorities = (selectedSlots: SelectedSlotType) => {
    const updatedSelectedSlots: SelectedSlotType = {};
    for (const key in selectedSlots) {
      updatedSelectedSlots[key] = {
        ...selectedSlots[key],
        priority: 0,
      };
    }
    setSelectedSlots(updatedSelectedSlots);
  };

  useEffect(
    () => {
      if (scheduleStep === 'selectTimeSlot') resetPriorities(selectedSlots);
    },
    [scheduleStep],
  );

추가로, useEffect 내부에서 실행할 작업이 명시적으로 드러나는 게 좋다고 생각해서 위와 같이 resetPriorities 함수를 따로 빼는것이 어떨까합니다.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

말씀해주신 모든 의견이 좋아보입니다. 배열로 변경하지 않고도 충분히 set할수 있겠군요!
PR참고해서 useEffect 사용없이 시간입력 페이지에서 우선순위를 모두 초기화하는 방향으로 가고싶었는데, 결국 가능시간 입력페이지에서

 if (scheduleStep === 'selectTimeSlot') resetPriorities(selectedSlots);

이런 로직을 첫 렌더링때 사용하려면 결국 useEffect가 필요할 것 같군요.. header에 onClick함수를 전달하는 방향으로 header가 개선되는 방향이 가장 적합할 것 같다는 생각이 드는데 어떻게 생각하시나요??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useEffect 사용하지 않고 현재 상황에서 해결할 수 있는 방안을 찾았습니다.

저 역시 effect를 사용하는 것에 충분히 이질감을 느끼고 있었고 위와 같은 생각을 하며 추후 개선해야지.. 하고있다가 조금 더 고민해보면서 effect를 사용하지 않고 평소의 흐름에서 state를 초기화할 수 있는 경우의 수를 생각해봤어요

  1. 우선순위페이지에서 뒤로가기 할 때 (header에 onClick reset함수 전달)
  2. “시간선택 페이지에서 다음으로 버튼 누를 때”

그래서 저희는 일반적인 렌더링 흐름에 맞게 2번을 선택할 수 있을 것 같아요!
시간선택 페이지에서는 우선순위 데이터가 사용되지 않아서 꼭 뒤로가기할 때 초기화할 필요없고 다시 한번 우선순위 페이지로 들어올 때 state를 초기화해주면 될 것 같다는 생각을 했습니다.
해서 시간선택 페이지에서 TimeSlotCta의 “다음” 버튼을 누를 때 reset로직을 추가했어요

아래코드 참고해주시고 의견주시면 감사하겠습니다! 또는 제가 놓치는 부분 있으면 편히 말씀해주세요!

function TimeSlotCta() {
  const { setScheduleStep } = useScheduleStepContext();
  const { selectedSlots, setSelectedSlots } = useSelectContext();
  const isValidSelection = Object.keys(selectedSlots).length !== 0;

  const resetPriorities = (selectedSlots: SelectedSlotType) => {
    const updatedSelectedSlots: SelectedSlotType = {};
    for (const key in selectedSlots) {
      updatedSelectedSlots[key] = {
        ...selectedSlots[key],
        priority: 0,
      };
    }
    setSelectedSlots(updatedSelectedSlots);
  };
  return (
    <BtnDim>
      <Button
        typeState={isValidSelection ? 'primaryActive' : 'secondaryDisabled'}
        onClick={() => {
          setScheduleStep('selectPriority');
          resetPriorities(selectedSlots);
        }}
      >
        <Text font={'button2'}>다음</Text>
      </Button>
    </BtnDim>
  );
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

왓!! 뭔가 방법이 있을 것 같다고 생각했는데, 다음 버튼에 로직을 심는 접근 아주 좋은 것 같습니다!!! 너무 좋은 솔루션이네요 창의력 👍
SelectScheduleTable.tsx에서 기존에 넣어놨던 useEffect 로직이 아직 남아있는거같은데 이거만 좀 제거해주세요!

<SelectContext.Provider
value={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,35 @@ function PriorityDropdown() {
const { selectedSlots, setSelectedSlots } = useSelectContext();
const [isOpenDropDown, setIsOpenDropDown] = useState([false, false, false]);

//우선 순위 시간순 정렬을 위한 날짜 시간 파싱함수
const parseDateTime = (dateStr: string, timeStr: string) => {
const [month, day] = dateStr.split('/');
const formatDay = day.padStart(2, '0');
const [hour, minute] = timeStr.split(':');
return Number(month + formatDay + hour + minute);
};

const sortedSlots = Object.entries(selectedSlots)
.slice()
.sort(
(a, b) => parseDateTime(a[1].date, a[1].startSlot) - parseDateTime(b[1].date, b[1].startSlot),
);

const formatDate = (date: string) => {
const [month, day, dayOfWeek] = date.split('/');
return `${month}/${day}(${dayOfWeek})`;
};

let defaultInput1 = '';
let defaultInput2 = '';
let defaultInput3 = '';
for (const key in selectedSlots) {
const item = selectedSlots[key];
const defaultInputs = Array(3).fill('');
Object.values(selectedSlots).forEach((item) => {
const date = formatDate(item.date);
const endSlot = addMinutes(item.endSlot, 30);
if (item.priority === 3) {
defaultInput1 = `${date} ${item.startSlot}~${endSlot}`;
} else if (item.priority === 2) {
defaultInput2 = `${date} ${item.startSlot}~${endSlot}`;
} else if (item.priority === 1) {
defaultInput3 = `${date} ${item.startSlot}~${endSlot}`;
if (item.priority > 0) {
defaultInputs[3 - item.priority] = `${date} ${item.startSlot}~${endSlot}`;
}
}
const [input_, setInput] = useState<string[]>([defaultInput1, defaultInput2, defaultInput3]);
});

const [input_, setInput] = useState<string[]>(defaultInputs);

const handleDropdown = (idx: number) => {
//dropdown이 열려있을 때
Expand All @@ -62,28 +70,13 @@ function PriorityDropdown() {

const handlePriority = (idx: number, item: SelectSlotType, stringSelectedSlotKey: string) => {
const selectedSlotKey = parseInt(stringSelectedSlotKey);
let selectedPriority: 0 | 1 | 2 | 3 = 0;
switch (idx) {
case 0:
selectedPriority = 3;
break;
case 1:
selectedPriority = 2;
break;
case 2:
selectedPriority = 1;
break;
default:
selectedPriority = 0;
break;
}

const selectedPriority = 3 - idx;
//이전 상태를 순회하면서 선택된 우선순위를 가지고 있는 데이터를 우선순위 0으로 초기화
setSelectedSlots((prev: SelectedSlotType) => {
const updatedSelectedSlots = Object.entries(prev).reduce(
(acc, [key, value]) => {
const prevSelectedSlotKey = parseInt(key);
//선택된 우선순위가 기존에 존재할 경우 0으로 초기화
//우선순위를 선택한 후 다시 설정할 경우 기존 priority 0으로 초기화
if (value.priority === selectedPriority) {
acc[prevSelectedSlotKey] = { ...value, priority: 0 };
} else {
Expand All @@ -109,15 +102,8 @@ function PriorityDropdown() {
const updatedInput = [...prev];
const endSlot = addMinutes(item.endSlot, 30);
const date = formatDate(item.date);
if (idx === 0) {
updatedInput[idx] = `${date} ${item.startSlot}~${endSlot}`;
} else if (idx === 1) {
updatedInput[idx] = `${date} ${item.startSlot}~${endSlot}`;
} else if (idx === 2) {
updatedInput[idx] = `${date} ${item.startSlot}~${endSlot}`;
} else {
updatedInput[idx] = 'error';
}

updatedInput[idx] = `${date} ${item.startSlot}~${endSlot}`;
return updatedInput;
});
handleDropdown(idx);
Expand All @@ -134,15 +120,7 @@ function PriorityDropdown() {
{`${idx + 1}`}순위
</Text>
</TextWrapper>
{idx === 0 ? (
<Circle1Icon />
) : idx === 1 ? (
<Circle2Icon />
) : idx === 2 ? (
<Circle3Icon />
) : (
<div />
)}
{idx === 0 ? <Circle1Ic /> : idx === 1 ? <Circle2Ic /> : <Circle3Ic />}
</CircleWrapper>
<InputWrapper>
<TimeInput
Expand All @@ -153,20 +131,12 @@ function PriorityDropdown() {
onClick={() => handleDropdown(idx)}
value={input_[idx]}
/>

{isOpenDropDown[idx] ? (
<DropDownIconWrapper>
<DropUpIc />{' '}
</DropDownIconWrapper>
) : (
<DropDownIconWrapper>
<DropDownIc />
</DropDownIconWrapper>
)}

<DropDownIconWrapper>
{isOpenDropDown[idx] ? <DropUpIc /> : <DropDownIc />}
</DropDownIconWrapper>
{isOpenDropDown[idx] && (
<DropdownWrapper>
{Object.entries(selectedSlots).map(
{sortedSlots.map(
([key, value]) =>
!value.priority && (
<DropDownItem key={key} onClick={() => handlePriority(idx, value, key)}>
Expand Down Expand Up @@ -222,9 +192,6 @@ const TextWrapper = styled.div`
left: 50%;
transform: translate(-50%, -50%);
`;
const Circle1Icon = styled(Circle1Ic)``;
const Circle2Icon = styled(Circle2Ic)``;
const Circle3Icon = styled(Circle3Ic)``;

const InputWrapper = styled.div`
position: relative;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import { useSelectContext } from 'pages/selectSchedule/contexts/useSelectContext
import { theme } from 'styles/theme';

import useSlotSeletion from './hooks/useSlotSelection';

import Slot from '../../../../components/timetableComponents/parts/Slot';

function SelectionColumn({ date, timeSlots }: ColumnStructure) {
const { selectedSlots } = useSelectContext();

const selectedSlotsPerDate = Object.entries(selectedSlots).filter(
([, slot]) => slot.date === date,
);
Expand Down
Loading