<commit_before>import PropTypes from 'prop-types';
import React, { Component } from 'react';
import styles from './OtherUserBottomNavBar.scss';
import RoundedIcon from "../RoundedIcon/RoundedIcon";
import translate from "../../../i18n/Translate";

@translate('OtherUserBottomNavBar')
export default class OtherUserBottomNavBar extends Component {

    static propTypes = {
        userSlug       : PropTypes.string,
        current        : PropTypes.oneOf(['about-me', 'proposals', 'messages', 'answers', 'interests']),
        notifications  : PropTypes.number,
        onClickHandler : PropTypes.func
    };

    static contextTypes = {
        router: PropTypes.object.isRequired
    };

    constructor(props) {
        super(props);

        this.handleClickAboutMe = this.handleClickAboutMe.bind(this);
        this.handleClickProposals = this.handleClickProposals.bind(this);
        this.handleClickAnswers = this.handleClickAnswers.bind(this);
        this.handleClickInterests = this.handleClickInterests.bind(this);

        this.handleClickAdd = this.handleClickAdd.bind(this);
        this.addProfessionalProposal = this.addProfessionalProposal.bind(this);
        this.addLeisurePlan = this.addLeisurePlan.bind(this);
        this.addExperienceProposal = this.addExperienceProposal.bind(this);
        this.closeAddModal = this.closeAddModal.bind(this);

        this.state = {
            addingProposal: false
        };
    }

    handleClickAboutMe() {
        const {userSlug, current} = this.props;

        if (current !== 'about-me') {
            this.context.router.push('/p/' + userSlug + '/about-me');
        }
    }

    handleClickProposals() {
        const {userSlug, current} = this.props;

        if (current !== 'proposals') {
            this.context.router.push('/p/' + userSlug + '/proposals');
        }
    }<commit_msg>Fix other user profile route on bottom nav bar<commit_after>import PropTypes from 'prop-types';
import React, { Component } from 'react';
import styles from './OtherUserBottomNavBar.scss';
import RoundedIcon from "../RoundedIcon/RoundedIcon";
import translate from "../../../i18n/Translate";

@translate('OtherUserBottomNavBar')
export default class OtherUserBottomNavBar extends Component {

    static propTypes = {
        userSlug       : PropTypes.string,
        current        : PropTypes.oneOf(['about-me', 'proposals', 'messages', 'answers', 'interests']),
        notifications  : PropTypes.number,
        onClickHandler : PropTypes.func
    };

    static contextTypes = {
        router: PropTypes.object.isRequired
    };

    constructor(props) {
        super(props);

        this.handleClickAboutMe = this.handleClickAboutMe.bind(this);
        this.handleClickProposals = this.handleClickProposals.bind(this);
        this.handleClickAnswers = this.handleClickAnswers.bind(this);
        this.handleClickInterests = this.handleClickInterests.bind(this);

        this.handleClickAdd = this.handleClickAdd.bind(this);
        this.addProfessionalProposal = this.addProfessionalProposal.bind(this);
        this.addLeisurePlan = this.addLeisurePlan.bind(this);
        this.addExperienceProposal = this.addExperienceProposal.bind(this);
        this.closeAddModal = this.closeAddModal.bind(this);

        this.state = {
            addingProposal: false
        };
    }

    handleClickAboutMe() {
        const {userSlug, current} = this.props;

        if (current !== 'about-me') {
            this.context.router.push('/p/' + userSlug);
        }
    }

    handleClickProposals() {
        const {userSlug, current} = this.props;

        if (current !== 'proposals') {
            this.context.router.push('/p/' + userSlug + '/proposals');
        }
    }
{'fraction_non_alphanumeric': 0.1226944667201283, 'fraction_numerical': 0.0010692328254477412, 'mean_word_length': 2.822267620020429, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7392216', 'n_tokens_mistral': 1088, 'n_tokens_neox': 1056, 'n_words': 189}