<commit_before>import React from "react";
import { connect } from "react-redux";
import { withRouter, Link } from "react-router-dom"
import { welcome, presentModal } from "../actions/homeActions";
import Modal, { Footer, Body, Alert, Confirm } from "../components/Modal.jsx"

const Home = ({ greeting, showModal, onPresentModal }) => {
    return (
        <div>
            <div class="jumbotron">
                <h1 class="display-4">{greeting}</h1>
                <p class="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
                <hr class="my-4" />
                <p>It uses utility classes for typography and spacing to space content out within the larger container.</p>
                <p class="lead">
                    <Link to="/Ni Hao" class="btn btn-primary">Ni Hao</Link>
                    <button class="btn btn-info" onClick={() => onPresentModal(true)}>Modal</button>
                </p>
            </div>

            {/* <Modal show={showModal} title="Alert" onCancel={() => onPresentModal(false)} onAction={() => onPresentModal(false)}>
                <Body>
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut malesuada sem eu rutrum pharetra. Aliquam aliquam, ex in aliquet gravida, sapien erat lobortis enim, ac blandit nisi risus non nibh. Suspendisse mauris ipsum, convallis vitae rutrum nec, vehicula eget ligula. Nulla congue condimentum vehicula. Etiam pellentesque interdum neque nec aliquet </p>
                </Body>
                <Footer>
                    <button type="button" class="btn btn-secondary" onClick={() => onPresentModal(false)}>Close</button>
                </Footer>
            </Modal> */}
            <Alert show={showModal} title="Alert" onClose={() => onPresentModal(false)}>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut malesuada sem eu rutrum pharetra. Aliquam aliquam, ex in aliquet gravida, sapien erat lobortis enim, ac blandit nisi risus non nibh. Suspendisse mauris ipsum, convallis vitae rutrum nec, vehicula eget ligula. Nulla congue condimentum vehicula. Etiam pellentesque interdum neque nec aliquet </p>
            </Alert>
            {/* <Confirm show={showModal} title="Alert" onCancel={() => onPresentModal(false)} onAction={() => onPresentModal(false)}>
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut malesuada sem eu rutrum pharetra. Aliquam aliquam, ex in aliquet gravida, sapien erat lobortis enim, ac blandit nisi risus non nibh. Suspendisse mauris ipsum, convallis vitae rutrum nec, vehicula eget ligula. Nulla congue condimentum vehicula. Etiam pellentesque interdum neque nec aliquet </p>
            </Confirm> */}
        </div>
    )
}

export default withRouter(connect(
    (store, props) => {
        return {
            greeting: store.home.greeting || "",
            showModal: store.home.showModal,
        }
    },
    (dispatch, props) => {
        setTimeout(() => {
            dispatch(welcome("Hello world"));
        }, 0);
        return {<commit_msg>bug fix<commit_after>import React from "react";
import { connect } from "react-redux";
import { withRouter, Link } from "react-router-dom"
import { welcome, presentModal } from "../actions/homeActions";
import Modal, { Footer, Body, Alert, Confirm } from "../components/Modal.jsx"

const Home = ({ greeting, showModal, onPresentModal }) => {
    return (
        <div>
            <div class="jumbotron">
                <h1 class="display-4">{greeting}</h1>
                <p class="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
                <hr class="my-4" />
                <p>It uses utility classes for typography and spacing to space content out within the larger container.</p>
                <p class="lead">
                    <Link to="/Ni Hao" class="btn btn-primary">Ni Hao</Link>
                    <button class="btn btn-info" onClick={() => onPresentModal(true)}>Modal</button>
                </p>
            </div>

            {/* <Modal show={showModal} title="Alert" onCancel={() => onPresentModal(false)} onAction={() => onPresentModal(false)}>
                <Body>
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut malesuada sem eu rutrum pharetra. Aliquam aliquam, ex in aliquet gravida, sapien erat lobortis enim, ac blandit nisi risus non nibh. Suspendisse mauris ipsum, convallis vitae rutrum nec, vehicula eget ligula. Nulla congue condimentum vehicula. Etiam pellentesque interdum neque nec aliquet </p>
                </Body>
                <Footer>
                    <button type="button" class="btn btn-secondary" onClick={() => onPresentModal(false)}>Close</button>
                </Footer>
            </Modal> */}
            <Alert show={showModal} title="Alert" onClose={() => onPresentModal(false)}>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut malesuada sem eu rutrum pharetra. Aliquam aliquam, ex in aliquet gravida, sapien erat lobortis enim, ac blandit nisi risus non nibh. Suspendisse mauris ipsum, convallis vitae rutrum nec, vehicula eget ligula. Nulla congue condimentum vehicula. Etiam pellentesque interdum neque nec aliquet </p>
            </Alert>
            {/* <Confirm show={showModal} title="Alert" onCancel={() => onPresentModal(false)} onAction={() => onPresentModal(false)}>
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut malesuada sem eu rutrum pharetra. Aliquam aliquam, ex in aliquet gravida, sapien erat lobortis enim, ac blandit nisi risus non nibh. Suspendisse mauris ipsum, convallis vitae rutrum nec, vehicula eget ligula. Nulla congue condimentum vehicula. Etiam pellentesque interdum neque nec aliquet </p>
            </Confirm> */}
        </div>
    )
}

export default withRouter(connect(
    (store, props) => {
        return {
            greeting: store.home.greeting || "",
            showModal: store.home.showModal,
        }
    },
    (dispatch, props) => {
        setTimeout(() => {
            dispatch(welcome(props.match.params.greeting || "Hello world"));
        }, 0);
        return {
{'fraction_non_alphanumeric': 0.11391208444934615, 'fraction_numerical': 0.001575547502757208, 'mean_word_length': 2.5844155844155843, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 95, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1427560', 'n_tokens_mistral': 1942, 'n_tokens_neox': 1866, 'n_words': 588}