<commit_before>import React, { PropTypes } from 'react';
import { LinkContainer } from 'react-router-bootstrap';
import Navbar from 'react-bootstrap/lib/Navbar';
import Nav from 'react-bootstrap/lib/Nav';
import NavItem from 'react-bootstrap/lib/NavItem';

import { injectT } from 'i18n';
import { getSearchPageUrl } from 'utils/searchUtils';

function MainNavbar(props) {
  const {
    activeLink,
    clearSearchResults,
    isAdmin,
    isLoggedIn,
    t,
  } = props;

  return (
    <Navbar className="app-MainNavbar" fluid>
      <Navbar.Header>
        <Navbar.Toggle />
      </Navbar.Header>
      <Navbar.Collapse>
        <Nav activeKey={activeLink}>
          <LinkContainer to="/home">
            <NavItem className={activeLink === 'home' ? 'active' : ''} eventKey="home">
              Varaamo
            </NavItem>
          </LinkContainer>
          <LinkContainer to={getSearchPageUrl()}>
            <NavItem eventKey="search" onClick={clearSearchResults}>
              {t('Navbar.search')}
            </NavItem>
          </LinkContainer>
          {isLoggedIn && (
            <LinkContainer to="/admin-resources">
              <NavItem eventKey="admin-resources">
                { isAdmin ? t('Navbar.adminResources') : t('Navbar.userFavorites') }
              </NavItem>
            </LinkContainer><commit_msg>Fixed Varaamo link to be shown always on navbar despite of device<commit_after>import React, { PropTypes } from 'react';
import { Link } from 'react-router';
import { LinkContainer } from 'react-router-bootstrap';
import Navbar from 'react-bootstrap/lib/Navbar';
import Nav from 'react-bootstrap/lib/Nav';
import NavItem from 'react-bootstrap/lib/NavItem';

import { injectT } from 'i18n';
import { getSearchPageUrl } from 'utils/searchUtils';

function MainNavbar(props) {
  const {
    activeLink,
    clearSearchResults,
    isAdmin,
    isLoggedIn,
    t,
  } = props;

  return (
    <Navbar className="app-MainNavbar" fluid>
      <Navbar.Header>
        <Navbar.Toggle />
        <Navbar.Brand>
          <Link to="/">
            Varaamo
          </Link>
        </Navbar.Brand>
      </Navbar.Header>
      <Navbar.Collapse>
        <Nav activeKey={activeLink}>
          <LinkContainer to={getSearchPageUrl()}>
            <NavItem eventKey="search" onClick={clearSearchResults}>
              {t('Navbar.search')}
            </NavItem>
          </LinkContainer>
          {isLoggedIn && (
            <LinkContainer to="/admin-resources">
              <NavItem eventKey="admin-resources">
                { isAdmin ? t('Navbar.adminResources') : t('Navbar.userFavorites') }
              </NavItem>
            </LinkContainer>
{'fraction_non_alphanumeric': 0.1300782705926202, 'fraction_numerical': 0.0014908684308609765, 'mean_word_length': 2.4104193138500634, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, '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': '2538892', 'n_tokens_mistral': 785, 'n_tokens_neox': 778, 'n_words': 162}