Commit 45f484d
authored
refactor(TIL): detail page 리팩토링 (#633)
* refactor: detail page내 <PostDetail /> <WeeklyTop5 /> 컴포넌트 suspense + errorboundary 추가
- 기존에는 상위에서 api를 호출해서 내려주는 방식으로 되있었는데, 이를 PostDetail 내부에서 하도록 처리
- loading, error props을 받아서 이를 분기로 렌더링해주고있었어서, 컴포넌트 return에 도달하는 인지 시간이 길었었음. 그래서, 이를 usesuspensequery로 바꿔주고 에러바운더리랑 서스펜스를 분리해줘서 관심사 분리를 해줌
* refactor: PostDetail 컴포넌트 내부 1차 리팩토링 할 것들 정리
- 디테일 페이지에 들어오면 왼쪽 오른쪽 섹션이 있고, 왼쪽 섹션에서는 본문 댓글입력, 댓글들 이렇게 파트들이 나눠져있음 => 이에 대한 UI가 코드에도 보이도록 리팩토링 게획 세우기
* wip
* refactor: 디테일 페이지내 컴포넌트 각각 분리
* refactor: ContentBody 컴포넌트 리팩토링
- 영역별로 컴포넌트 나눠줘서 화면과 1대1 매칭 해주기
* feat: divider 복원
* refactor: lint:fix
* fix: prettier1 parent f07ff16 commit 45f484d
File tree
28 files changed
+838
-715
lines changed- fundamentals/today-i-learned
- src
- api/hooks
- components
- features
- discussions
- PostDetail
- sprint
- contexts
- hooks
- pages
- post
- search
- timeline/components
- utils
28 files changed
+838
-715
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | 141 | | |
143 | 142 | | |
144 | 143 | | |
| |||
245 | 244 | | |
246 | 245 | | |
247 | 246 | | |
248 | | - | |
| 247 | + | |
249 | 248 | | |
250 | 249 | | |
251 | 250 | | |
252 | 251 | | |
253 | 252 | | |
254 | 253 | | |
255 | | - | |
256 | 254 | | |
257 | 255 | | |
258 | 256 | | |
| |||
0 commit comments