Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mm 104 selection buttons and display image preview #25

Merged

Conversation

claudiaGiancola
Copy link
Collaborator

Description of changes - what did you do

Added component PreviewImage and inside of it we created three inputs (Birthday form + today's date button + random button) that, if clicked, allow the relative image to be displayed.

We updated Home.tsx to include this PreviewImage component and show the relative inputs and result image.

In App.scss we implemented a very simple styling of the chosen preview image.

Things to Check

  • [yes] Have all the requirements of your ticket have been met
  • [n/a] Have you added tests if needed for your ticket
  • [n/a] Are all the tests passing

Copy link
Contributor

@Kiran-R-K Kiran-R-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small changes and then I will be happy to approve after

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this files is doing anything - can it be removed?

const [myPreviewImage, setMyPreviewImage] = useState<PictureOfDay | null>(null);
const [birthday, setBirthday] = useState('');

const handleRandomButtonClick = async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be running correctly but I don't think there's time to fix it so let's remove the random button from the page

Copy link
Contributor

@Kiran-R-K Kiran-R-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job

@dorothyynwong dorothyynwong merged commit da362e2 into main Aug 2, 2024
1 check passed
@dorothyynwong dorothyynwong deleted the mm-104-selection-buttons--and-display-image-preview branch August 2, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants