import MenuIcon from 'shared/components/icons/menu.js' import { linkClasses, Chevron } from 'shared/components/navigation/primary.js' import { useTranslation } from 'next-i18next' import {defaultGist} from 'shared/hooks/useGist' const View = props => { const { t } = useTranslation(['app']) const entries = [ { name: 'measurements', title: t('measurements'), onClick: () => props.updateGist(['_state', 'view'], 'measurements', true) }, { name: 'draft', title: t('draftDesign', { design: props.design.config.data.name }), onClick: () => props.updateGist(['_state', 'view'], 'draft', true) }, { name: 'test', title: t('testDesign', { design: props.design.config.data.name }), onClick: () => props.updateGist(['_state', 'view'], 'test', true) }, { name: 'printingLayout', title: t('layoutThing', { thing: props.design.config.data.name }) + ': ' + t('forPrinting'), onClick: () => props.updateGist(['_state', 'view'], 'printingLayout', true) }, { name: 'cuttingLayout', title: t('layoutThing', { thing: props.design.config.data.name }) + ': ' + t('forCutting'), onClick: () => props.updateGist(['_state', 'view'], 'cuttingLayout', true) }, { name: 'export', title: t('exportThing', { thing: props.design.config.data.name }), onClick: () => props.updateGist(['_state', 'view'], 'export', true) }, { name: 'events', title: t('events'), onClick: () => props.updateGist(['_state', 'view'], 'events', true) }, { name: 'yaml', title: t('YAML'), onClick: () => props.updateGist(['_state', 'view'], 'yaml', true) }, { name: 'json', title: t('JSON'), onClick: () => props.updateGist(['_state', 'view'], 'json', true) }, { name: 'edit', title: t('editThing', { thing: 'YAML' }), onClick: () => props.updateGist(['_state', 'view'], 'edit', true) }, { name: 'clear', title: t('clearThing', { thing: 'YAML' }), onClick: () => props.setGist(defaultGist(props.design, props.gist.locale)) }, ] return (
{t('view')}
) } export default View