diff --git a/frontend/src/components/topbar/topbar-menu.tsx b/frontend/src/components/topbar/topbar-menu.tsx index d128edc2..172491fb 100644 --- a/frontend/src/components/topbar/topbar-menu.tsx +++ b/frontend/src/components/topbar/topbar-menu.tsx @@ -1,4 +1,3 @@ - import React from 'react'; import { FormattedMessage } from 'react-intl'; import { @@ -11,94 +10,33 @@ export const TopbarMenu = ({ history }) => { - const handleHowItWorks = () => { - window.location.assign('/#/welcome') - } - - const handlePricing = () => { - window.location.assign('/#/pricing') - } - - const handleTeamLink = () => { - window.location.assign('/#/team') - } - - const handleDocsLink = () => { - window.open('https://docs.gitpay.me/en') - } - - const handleViewTasks = () => { - window.location.assign('/#/tasks/open') - } + const menuItems = [ + { onClick: () => window.location.assign('/#/welcome'), id: 'topbar.link.about', defaultMessage: 'About us' }, + { onClick: () => window.location.assign('/#/pricing'), id: 'topbar.link.prices', defaultMessage: 'Prices' }, + { onClick: () => window.location.assign('/#/team'), id: 'task.actions.team', defaultMessage: 'Team' }, + { onClick: () => window.open('https://docs.gitpay.me/en'), id: 'task.actions.docs', defaultMessage: 'Documentation' }, + { onClick: () => window.location.assign('/#/tasks/open'), id: 'topbar.link.explore', defaultMessage: 'Explore' } + ]; return ( <> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + {menuItems.map((item, index) => ( + + + + + + ))} ) } -export default TopbarMenu \ No newline at end of file +export default TopbarMenu