<commit_before>import React from "react";
import transitionStyles from "./transition-styles";
import { CSSTransition } from "react-transition-group";
import { ENTER_TIMEOUT, EXIT_TIMEOUT } from "./container";
import useSheet from "react-jss";

const timeout = { enter: ENTER_TIMEOUT, exit: EXIT_TIMEOUT };

const AlertTransition = ({ sheet: { classes }, ...props }) =>
	props && props.children ? (
		<CSSTransition
			timeout={timeout}
			classNames={classes}
			onExited={props.onExited}
		>
			{props.children}
		</CSSTransition>
	) : null;

export default useSheet(transitionStyles)(AlertTransition);
<commit_msg>Fix broken dismissing of alerts<commit_after>import React from "react";
import transitionStyles from "./transition-styles";
import { CSSTransition } from "react-transition-group";
import { ENTER_TIMEOUT, EXIT_TIMEOUT } from "./container";
import useSheet from "react-jss";

const timeout = { enter: ENTER_TIMEOUT, exit: EXIT_TIMEOUT };

const AlertTransition = ({ sheet: { classes }, ...props }) => {
	delete props.classes; // if it is there (it may not be depending on which version of JSS is used)
	return <CSSTransition timeout={timeout} classNames={classes} {...props} />;
};

export default useSheet(transitionStyles)(AlertTransition);

{'fraction_non_alphanumeric': 0.13046937151949084, 'fraction_numerical': 0.0, 'mean_word_length': 5.166666666666667, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, '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': '5415555', 'n_tokens_mistral': 379, 'n_tokens_neox': 370, 'n_words': 106}