<commit_before>import React, { ReactElement } from 'react';
import { Nav } from 'react-bootstrap';
import { Link } from 'react-router-dom';
import NavbarHoc, { NavBarProps } from './NavbarHoc';

export default function ShapesNav({ onLogout }: NavBarProps): ReactElement {

    const createEntry = (name: string, route: string) => createNavEntry(name, route);

    return (
        <NavbarHoc onLogout={ onLogout } brand= "shapes" brandUrl= "/idaishapes">
            <Nav className="mr-auto">
                { createEntry('Browse & Select', './') }
                { createEntry('Find', 'find') }
                { createEntry('Export', 'export') }
                { createEntry('Edit', 'edit') }
                { createEntry('Mining', 'mining') }
            </Nav>
        </NavbarHoc>
    );
}


const createNavEntry = (name: string, route: string): ReactElement => (
    <Nav.Link as="span">
        <Link to={ route }>
            { name }
        </Link><commit_msg>Minor refactoring <ShapesNav /><commit_after>import React, { ReactElement } from 'react';
import { Nav } from 'react-bootstrap';
import { Link } from 'react-router-dom';
import NavbarHoc, { NavBarProps } from './NavbarHoc';


export default function ShapesNav({ onLogout }: NavBarProps): ReactElement {

    const renderEntry = (name: string, route: string) => renderNavEntry(name, route);

    return (
        <NavbarHoc onLogout={ onLogout } brand= "shapes" brandUrl= "/idaishapes">
            <Nav className="mr-auto">
                { renderEntry('Browse & Select', './') }
                { renderEntry('Find', 'find') }
                { renderEntry('Export', 'export') }
                { renderEntry('Edit', 'edit') }
                { renderEntry('Mining', 'mining') }
            </Nav>
        </NavbarHoc>
    );
}


const renderNavEntry = (name: string, route: string): ReactElement => (
    <Nav.Link as="span">
        <Link to={ route }>
            { name }
        </Link>
{'fraction_non_alphanumeric': 0.1550584646670056, 'fraction_numerical': 0.0, 'mean_word_length': 2.4285714285714284, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3727618', 'n_tokens_mistral': 590, 'n_tokens_neox': 569, 'n_words': 140}