@@ -29,7 +29,7 @@ const Global = createGlobalStyle`
2929const SearchInput = styled ( Input . Search ) `
3030 vertical-align: middle;
3131` ;
32- const AppLayout = ( { children } ) => {
32+ function AppLayout ( { children } ) {
3333 const { me } = useSelector ( ( state ) => state . user ) ;
3434 const [ searchInput , setSearchInput ] = useState ( '' ) ;
3535 const onChangeSearchInput = useCallback ( ( e ) => {
@@ -44,22 +44,22 @@ const AppLayout = ({ children }) => {
4444 < Layout className = "layout" >
4545 < Global />
4646 < Header style = { { position : 'fixed' , zIndex : 1 , width : '100%' } } >
47- < Menu theme = "dark" mode = "horizontal" defaultSelectedKeys = { [ router . pathname ] } >
48- < Menu . Item key = "/" >
49- < Link href = "/" > < a > 노드버드</ a > </ Link >
50- </ Menu . Item >
51- < Menu . Item key = "/profile" >
52- < Link href = "/profile" > < a > 프로필</ a > </ Link >
53- </ Menu . Item >
54- < Menu . Item key = "/search" >
55- < SearchInput
47+ < Menu
48+ theme = "dark"
49+ mode = "horizontal"
50+ defaultSelectedKeys = { [ router . pathname ] }
51+ items = { [
52+ { label : < Link href = "/" > < a > 노드버드</ a > </ Link > , key : '/' } ,
53+ { label : < Link href = "/profile" > < a > 프로필</ a > </ Link > , key : '/profile' } ,
54+ { label : < SearchInput
5655 enterButton
5756 value = { searchInput }
5857 onChange = { onChangeSearchInput }
5958 onSearch = { onSearch }
60- />
61- </ Menu . Item >
62- </ Menu >
59+ /> ,
60+ key : '/search' } ,
61+ ] }
62+ />
6363 </ Header >
6464 < Content style = { { padding : '0 50px' , marginTop : 64 } } >
6565 < div style = { { minHeight : '400px' , padding : '24px' , backgroundColor : '#FFF' } } >
@@ -76,7 +76,7 @@ const AppLayout = ({ children }) => {
7676 </ Content >
7777 </ Layout >
7878 ) ;
79- } ;
79+ }
8080
8181AppLayout . propTypes = {
8282 children : ProTypes . node . isRequired ,
0 commit comments