-
Notifications
You must be signed in to change notification settings - Fork 50
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
[점심 뭐 먹지 미션 Step 2] 윤생(이윤성) 미션 제출합니다. #64
Changes from 18 commits
c362b95
01ac77c
b7f2109
e8a33ce
3ad22ae
310aee7
14bd03b
136ee31
86a387b
0aeafd1
53cbdda
18be4e1
a4a480f
1a170e6
d753b1b
6dae5e2
597a866
02bb074
fc22a75
f4eb604
139223d
6c20b21
af8939e
aa8a891
5429324
ab48c82
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
import React from 'react'; | ||
import Header from './common/Header.tsx'; | ||
|
||
class MainHeader extends React.Component { | ||
render() { | ||
return ( | ||
<Header> | ||
<h1 className="gnb__title text-title">점심 뭐 먹지</h1> | ||
</Header> | ||
); | ||
} | ||
} | ||
const MainHeader: React.FC = () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 타입으로 React.FC 를 주는건 좋지 않습니다! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 헉 읽을 것 까지.. 감사합니다 케빈 🙇 |
||
return ( | ||
<Header> | ||
<h1 className="gnb__title text-title">점심 뭐 먹지</h1> | ||
</Header> | ||
); | ||
}; | ||
|
||
export default MainHeader; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분과
const [isOpenDrawer, setIsOpenDrawer] = useState<boolean>(false);
해당 상태는 App 에서가 아닌 RestaurantDetailDrawer 안에서 정의해도 되지않을까요? 최대한 App은 가벼운게 좋습니당!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drawer를 열고 닫는 부분이 같은 계층에 있는 RestraurantItem과 RestaurantDetailDrawer 둘다에 있어서 다음과 같이 주었습니다!
state 끌어올리기를 참고했어요!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 RestraurantItem, RestaurantDetailDrawer 둘다 필요하군요! 이해했습니다