<commit_before>require('./SubNav.scss')

import React, { Component } from 'react'
import Carousel from '../Carousel/Carousel'
import StandardListItem from '../StandardListItem/StandardListItem'

const tcSubNav = {
  compete : [
    {img: require('./placeholder.svg'), text: 'Design Challenges', link: '/challenges/design/active'},
    {img: require('./placeholder.svg'), text: 'Development Challenges', link: '/challenges/develop/active'},
    {img: require('./placeholder.svg'), text: 'Data Science Challenges', link: '/challenges/data/active'},
    // TODO dynamic domain
    {img: require('./placeholder.svg'), text: 'Competitive Programming', link: 'https://arena.topcoder.com'}
  ],
  learn : [
    {img: require('./placeholder.svg'), text: 'Getting Started', link: '/getting-started'},
    {img: require('./placeholder.svg'), text: 'Design Challenges', link: '/community/design'},
    {img: require('./placeholder.svg'), text: 'Development Challenges', link: '/community/develop'},
    {img: require('./placeholder.svg'), text: 'Data Science Challenges', link: '/community/data-science'},
    {img: require('./placeholder.svg'), text: 'Competitive Programming', link: '/community/competitive programming/'}
  ],
  community : [
    {img: require('./placeholder.svg'), text: 'Overview', link: '/community/members'},
    // TODO dynamic domain
    {img: require('./placeholder.svg'), text: 'TCO16', link: '//tco16.topcoder.com'},
    {img: require('./placeholder.svg'), text: 'Programs', link: '/community/member-overview'},
    // TODO dynamic domain
    {img: require('./placeholder.svg'), text: 'Forums', link: '//apps.topcoder.com/forums'},
    {img: require('./placeholder.svg'), text: 'Statistics', link: '/community/statistics'},
    {img: require('./placeholder.svg'), text: 'Events', link: '/community/events'},
    {img: require('./placeholder.svg'), text: 'Blog', link: '/blog'}
  ]
}

const SubNav = ({ primaryMenu = 'compete' }) => {
  var subNav = tcSubNav[primaryMenu]
  const subNavMap = (item, idx) => {
    return (
      <StandardListItem key={idx} labelText={item.text} imgSrc={item.img} />
    )
  }
  return (
    <div className="SubNav">
      <Carousel>
        { subNav.map(subNavMap) }
      </Carousel>
    </div>
  )
}

export default SubNav<commit_msg>AS#101448607854424, Create Sub Navigation React component<commit_after>require('./SubNav.scss')

import React from 'react'
import Carousel from '../Carousel/Carousel'
import StandardListItem from '../StandardListItem/StandardListItem'

const tcSubNav = {
  compete : [
    {img: require('./placeholder.svg'), text: 'Design Challenges', link: '/challenges/design/active'},
    {img: require('./placeholder.svg'), text: 'Development Challenges', link: '/challenges/develop/active'},
    {img: require('./placeholder.svg'), text: 'Data Science Challenges', link: '/challenges/data/active'},
    // TODO dynamic domain
    {img: require('./placeholder.svg'), text: 'Competitive Programming', link: 'https://arena.topcoder.com'}
  ],
  learn : [
    {img: require('./placeholder.svg'), text: 'Getting Started', link: '/getting-started'},
    {img: require('./placeholder.svg'), text: 'Design Challenges', link: '/community/design'},
    {img: require('./placeholder.svg'), text: 'Development Challenges', link: '/community/develop'},
    {img: require('./placeholder.svg'), text: 'Data Science Challenges', link: '/community/data-science'},
    {img: require('./placeholder.svg'), text: 'Competitive Programming', link: '/community/competitive programming/'}
  ],
  community : [
    {img: require('./placeholder.svg'), text: 'Overview', link: '/community/members'},
    // TODO dynamic domain
    {img: require('./placeholder.svg'), text: 'TCO16', link: '//tco16.topcoder.com'},
    {img: require('./placeholder.svg'), text: 'Programs', link: '/community/member-overview'},
    // TODO dynamic domain
    {img: require('./placeholder.svg'), text: 'Forums', link: '//apps.topcoder.com/forums'},
    {img: require('./placeholder.svg'), text: 'Statistics', link: '/community/statistics'},
    {img: require('./placeholder.svg'), text: 'Events', link: '/community/events'},
    {img: require('./placeholder.svg'), text: 'Blog', link: '/blog'}
  ]
}

const SubNav = ({ primaryMenu = 'compete' }) => {
  const subNav = tcSubNav[primaryMenu]
  const subNavMap = (item, idx) => {
    return (
      <StandardListItem key={idx} labelText={item.text} imgSrc={item.img} />
    )
  }
  return (
    <div className="SubNav">
      <Carousel>
        { subNav.map(subNavMap) }
      </Carousel>
    </div>
  )
}

export default SubNav
{'fraction_non_alphanumeric': 0.19626168224299065, 'fraction_numerical': 0.004998913279721799, 'mean_word_length': 4.029508196721311, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7363214', 'n_tokens_mistral': 1434, 'n_tokens_neox': 1365, 'n_words': 327}