<commit_before>import { connect } from "react-redux";
import { PagePresentation, IPageProps } from "./PagePresentation";
import { IState } from "store/interfaces/State";
import { getCurrentPub } from "store/reducers/Reducer";
import { localization } from "services/common/LocalizationService";

const mapStateToProps = (state: IState, ownProps: IPageProps): {} => ({
    direction: localization.getDirection(state.language),
    anchor: getCurrentPub(state).anchor
});

/**
 * Connector of Page component for Redux
 *
 * @export
 */
export const Page = connect(mapStateToProps)(PagePresentation);<commit_msg>KCWA-468 get pub language for topic content<commit_after>import { connect } from "react-redux";
import { PagePresentation, IPageProps } from "./PagePresentation";
import { IState } from "store/interfaces/State";
import { getCurrentPub, getPubById } from "store/reducers/Reducer";
import { localization } from "services/common/LocalizationService";

const mapStateToProps = (state: IState, ownProps: IPageProps): {} => {
    const { publicationId, anchor } = getCurrentPub(state);
    const pub = getPubById(state, publicationId);
    return {
        direction: localization.getDirection(pub.language || state.language),
        anchor: anchor
    };
};

/**
 * Connector of Page component for Redux
 *
 * @export
 */
export const Page = connect(mapStateToProps)(PagePresentation);
{'fraction_non_alphanumeric': 0.12455003599712024, 'fraction_numerical': 0.0021598272138228943, 'mean_word_length': 5.043478260869565, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6623980', 'n_tokens_mistral': 415, 'n_tokens_neox': 405, 'n_words': 100}