Menu component update

js -> jsx
update imports
no default import
This commit is contained in:
tmshv committed 2019-10-14 18:17:39 +03:00
1 parent 7ce46cbae2
commit 34354e9577
2 files changed
+3 -5

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
import React from 'react'
import Menu from './Menu'
import { Menu } from './Menu'
import Footer from './Footer'
import Comments from './Comments'
@@ -1,4 +1,4 @@
const React = require('react')
import React from 'react'
const getPathWithNoTrailingSlas = require('../lib/url').getPathWithNoTrailingSlash
const hasSubmenu = item => !!item.items
@@ -24,7 +24,7 @@ const MenuToggle = () => (
</div>
)
const Menu = ({items}) => {
export const Menu = ({items}) => {
const content = items.map((item, index) => (
<li key={index}
className={`HMenu__item ${hmenuCurClassName(item.highlighted)} ${item.color} ${selectedClassName(item.highlighted)}`}
@@ -54,5 +54,3 @@ const Submenu = ({items}) => (
))}
</menu>
)
module.exports = Menu