ContriHUB / Meme-Generator

a simple meme generator using ReactJs
1 stars 22 forks source link

Added reset functionality #16

Closed harshN-17 closed 2 years ago

harshN-17 commented 2 years ago

Fixed #2 added a reset button that clears the input text field and the image and its texts too. added two useStates for each input field to set the empty after reset button is clicked. minor fix: added 'alt' attribute in the img tag which was giving warning

DuP-491 commented 2 years ago

@harshN-17 mention issue number

harshN-17 commented 2 years ago

@DuP-491 I have mentioned the issue number

DuP-491 commented 2 years ago

@harshN-17 there were bugs I have encountered

harshN-17 commented 2 years ago

@DuP-491 I purposely made the placecholder vanish as it said 'to clear the texts' but will fix that quickly. Meanwhile I will also try to work on the second bug

harshN-17 commented 2 years ago

@DuP-491 I looked at the second bug you mentioned. The code works fine if we upload different file. But it does not take action for the same file. (before or after reset) It seems like this bug already existed. Since there is a call of onChange function on file input it does not get triggered if we upload same file consecutively.

DuP-491 commented 2 years ago

@harshN-17 changing clearing text does not mean removing placeholder

harshN-17 commented 2 years ago

Kindly check my latest commit.

DuP-491 commented 2 years ago

LGTM!