<commit_before>import React, { Component } from "react";
import { string, func } from "prop-types";
import styled from "styled-components";
import { FormattedMessage } from "react-intl";

import {
  WHITE_COLOR,
  DARK_GRAY_COLOR
} from "../../../../../config/constants/colors";

import InputEnabled from "./InputEnabled";

const AvatarWrapper = styled.div`
  width: 100px;
  height: 100px;
  position: relative;
  cursor: pointer;
`;

const EditAvatar = styled.span`
  color: ${WHITE_COLOR};
  background-color: ${DARK_GRAY_COLOR};
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  opacity: 0.7;
  padding: 5px;
`;

class AvatarInputField extends Component {
  constructor(props) {
    super(props);
    this.state = { disabled: true, timestamp: "" };
    this.enableEdit = this.enableEdit.bind(this);
    this.disableEdit = this.disableEdit.bind(this);
    this.rerender = this.rerender.bind(this);
  }

  enableEdit() {
    this.setState({ disabled: false });
  }

  disableEdit() {
    this.setState({ disabled: true });
  }

  rerender() {
    this.setState({ timestamp: `?${new Date().getTime()}` });<commit_msg>fixed edit image on hover action<commit_after>import React, { Component } from "react";
import { string, func } from "prop-types";
import styled from "styled-components";
import { FormattedMessage } from "react-intl";

import {
  WHITE_COLOR,
  DARK_GRAY_COLOR
} from "../../../../../config/constants/colors";

import InputEnabled from "./InputEnabled";

const AvatarWrapper = styled.div`
  width: 100px;
  height: 100px;
  position: relative;
  cursor: pointer;
  &:hover > span {
    display: block;
  }
`;

const EditAvatar = styled.span`
  display: none;
  color: ${WHITE_COLOR};
  background-color: ${DARK_GRAY_COLOR};
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  opacity: 0.7;
  padding: 5px;
`;

class AvatarInputField extends Component {
  constructor(props) {
    super(props);
    this.state = { disabled: true, timestamp: "" };
    this.enableEdit = this.enableEdit.bind(this);
    this.disableEdit = this.disableEdit.bind(this);
    this.rerender = this.rerender.bind(this);
  }

  enableEdit() {
    this.setState({ disabled: false });
  }

  disableEdit() {
    this.setState({ disabled: true });
  }

  rerender() {
    this.setState({ timestamp: `?${new Date().getTime()}` });
{'fraction_non_alphanumeric': 0.15677061085006408, 'fraction_numerical': 0.01196070055531824, 'mean_word_length': 3.693386773547094, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2281073', 'n_tokens_mistral': 797, 'n_tokens_neox': 774, 'n_words': 183}