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

Create Dog CEO App #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yuriyivanenko
Copy link

App fetches images and breeds from URL's.
Breeds can be filtered with a dropdown. Clicking on a breed changes the color randomly.

App fetches images and breeds from URL's.
Breeds can be filtered with a dropdown. Clicking on
a breed changes the color randomly.
Comment on lines +23 to +44
<option value="e">e</option>
<option value="f">f</option>
<option value="g">g</option>
<option value="h">h</option>
<option value="i">i</option>
<option value="j">j</option>
<option value="k">k</option>
<option value="l">l</option>
<option value="m">m</option>
<option value="n">n</option>
<option value="o">o</option>
<option value="p">p</option>
<option value="q">q</option>
<option value="r">r</option>
<option value="s">s</option>
<option value="t">t</option>
<option value="u">u</option>
<option value="v">v</option>
<option value="w">w</option>
<option value="x">x</option>
<option value="y">y</option>
<option value="z">z</option>

Choose a reason for hiding this comment

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

Can you think of any ways to do this programmatically in JS?

}

const handleError = (error) => {
console.log(error)

Choose a reason for hiding this comment

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

Suggested change
console.log(error)

Comment on lines +66 to +73
function getRandomColor() {
const hexLetters = '0123456789ABCDEF';
let color = '#';
for (let i = 0; i < 6; i++) {
color += hexLetters[Math.floor(Math.random() * 16)];
}
return color;
}

Choose a reason for hiding this comment

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

Fun!

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.

2 participants