Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eucaue/advice-generator-app
Challenge from the https://www.frontendmentor.io/
https://github.com/eucaue/advice-generator-app
axios-react front-end front-end-development frontend frontend-mentor react reactjs styled-components typescript
Last synced: 10 days ago
JSON representation
Challenge from the https://www.frontendmentor.io/
- Host: GitHub
- URL: https://github.com/eucaue/advice-generator-app
- Owner: EuCaue
- License: gpl-3.0
- Created: 2022-08-21T19:19:45.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-08-29T23:37:07.000Z (about 2 years ago)
- Last Synced: 2023-04-30T23:39:56.276Z (over 1 year ago)
- Topics: axios-react, front-end, front-end-development, frontend, frontend-mentor, react, reactjs, styled-components, typescript
- Language: TypeScript
- Homepage: https://advice-generator-app-rouge.vercel.app
- Size: 825 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Frontend Mentor - Advice generator app solution
This is a solution to the [Advice generator app challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/advice-generator-app-QdUG-13db). Frontend Mentor challenges help you improve your coding skills by building realistic projects.
## Table of contents
- [Overview](#overview)
- [The challenge](#the-challenge)
- [Screenshot](#screenshot)
- [Links](#links)
- [My process](#my-process)
- [Built with](#built-with)
- [What I learned](#what-i-learned)
- [Continued development](#continued-development)
- [Useful resources](#useful-resources)
- [Author](#author)## Overview
### The challenge
Users should be able to:
- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Generate a new piece of advice by clicking the dice icon### Screenshot
![](screenshots/screenshot.png)
More Screenshots, in the screenshots folder!### Links
- Solution URL: [Github Repo](https://github.com/EuCaue/advice-generator-app)
- Live Site URL: [Live Site](https://advice-generator-app-rouge.vercel.app/)## My process
### Built with
- Semantic HTML5 (TSX) markup
- CSS custom properties
- Flexbox
- [React](https://reactjs.org/) - JS library
- [Styled Components](https://styled-components.com/) - For styles
- [Typescript](https://www.typescriptlang.org/) - For React
- [Axios](https://axios-http.com/) - For API requests
- [Vercel](https://vercel.com/) - For deploy the project### What I learned
```tsx
ADVICE # {id}
{`\u{201C} ${slip}\u{201D}`}
``````css
@media only screen and (max-width: 40em) {
width: 15.4em;
height: 14.4em;${DividerImg} {
width: 13em;
transform: translateY(3.2em);
}form {
padding-bottom: 2em;
}${DiceButton} {
transform: translateY(4.6em);
}
}
}
``````ts
async function adviceDefault(): Promise {
setIsLoading(true);
try {
const { data } = await axios.get(
`https://api.adviceslip.com/advice/${66}`,
);setSlip(data.slip.advice);
setID(data.slip.id);
}
```### Useful resources
- [W3Schools](https://www.w3schools.com/) - This helped me a lot with css.
## Author
- Github - [EuCaue](https://www.github.com/EuCaue)
- Frontend Mentor - [@EuCaue](https://www.frontendmentor.io/profile/EuCaue)
- LinkedIn - [Caue Souza](https://www.linkedin.com/in/caue-souza/)