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

Refactor/FriendsMain component 구조변경 #216

Merged

Conversation

AngelaChaejung
Copy link
Collaborator

@AngelaChaejung AngelaChaejung commented Apr 20, 2023

  1. Friends ScheduleCard 삭제=> 메인페이지의 ScheduleCard 컴포넌트 재사용
  2. MainHeader=> Main 컴포넌트의 복잡도를 낮추고 Friends와 일관성을 위해 헤더카드부분을 별도의 컴포넌트로 뺐습니다 (메인헤더 디자인 바뀔 수 있다고 얘기 나온 적 있었는데 바뀌게되면 요 컴포넌트만 수정하면 됩니당)
  3. Friends Header=>다른 유저페이지에서는 들어가는 텍스트가 메인페이지와 달라 재사용은 불가능했으나 컴포넌트를 분리해두고 200일 때, 403일 때 두가지 상황 조건부렌더링으로 재사용했습니다.
  4. Friends200,Friends403 => 기존코드는 FriendsMain 하나의 컴포넌트내에서 status를 확인해 서버통신 및 전체 렌더링을 모두 처리하였으나 컴포넌트간 역할의 분리를 위해 리팩토링 작업 후 FriendsMain은 데이터를 schedule state에 저장하고 팔로우상태확인하여 렌더링여부 결정하는 역할만 하도록 변경됨.
  5. 그 외 : styled components reset 제거 후 깨진 css 수정 (403페이지 )

요약: 컴포넌트 분리작업을 통해서 중복 코드를 줄였습니다

#217

AngelaChaejung and others added 6 commits April 13, 2023 10:38
기존코드는 FriendsMain 하나의 컴포넌트내에서 status를 확인해 서버통신 및 전체 렌더링을 모두 처리하였으나 컴포넌트간 역할의 분리를 위해 리팩토링 작업 후 FriendsMain은 데이터를 schedule state에 저장하고 팔로우상태확인하여 렌더링여부 결정하는 역할만 하도록 변경됨.
@AngelaChaejung AngelaChaejung changed the title Refactor/FriendsMain component 구조변경 Refactor/FriendsMain component 구조변경 #217 Apr 20, 2023
@AngelaChaejung AngelaChaejung changed the title Refactor/FriendsMain component 구조변경 #217 Refactor/FriendsMain component 구조변경 Apr 20, 2023
@haruharuganda haruharuganda merged commit fa91609 into gnims-project:dev Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants