checked if liks are given

pull/751/head
LianaHus 4 years ago committed by Liana Husikyan
parent 34ffbab2f2
commit 17e490f923
  1. 14
      apps/remix-ide/src/app/ui/contextMenu.js

@ -46,11 +46,15 @@ module.exports = (event, items, linkItems) => {
return current
})
const menuForLinks = Object.keys(linkItems).map((item, index) => {
const current = yo`<li id="menuitem${item.toLowerCase()}" class=${css.liitem}><a href=${linkItems[item]} target="_blank">${item}</a></li>`
current.onclick = () => { hide(null, true) }
return current
})
let menuForLinks = yo``
if (linkItems) {
menuForLinks = Object.keys(linkItems).map((item, index) => {
const current = yo`<li id="menuitem${item.toLowerCase()}" class=${css.liitem}><a href=${linkItems[item]} target="_blank">${item}</a></li>`
current.onclick = () => { hide(null, true) }
return current
})
}
const container = yo`
<div id="menuItemsContainer" class="p-1 ${css.container} bg-light shadow border">
<ul id='menuitems'>${menu} ${menuForLinks}</ul>

Loading…
Cancel
Save