Merge pull request 'develop' (#1) from develop into main

Reviewed-on: #1
This commit is contained in:
PATRICK DE SOUZA SILVA 2023-01-21 02:18:44 +00:00
commit 525a4bda8f
57 changed files with 44620 additions and 73 deletions

23
.gitignore vendored Normal file
View File

@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

6
.prettierrc Normal file
View File

@ -0,0 +1,6 @@
{
"semi": true,
"trailingComma": "none",
"singleQuote": true,
"printWidth": 80
}

View File

@ -1,93 +1,46 @@
# Desafio REACT e Typescript
# Getting Started with Create React App
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
## Getting started
In the project directory, you can run:
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
### `npm start`
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
## Add your files
The page will reload if you make edits.\
You will also see any lint errors in the console.
- [ ] [Create](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
### `npm test`
```
cd existing_repo
git remote add origin https://gitlab.com/m3-academy/fase-06/desafio-react-e-typescript.git
git branch -M main
git push -uf origin main
```
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
## Integrate with your tools
### `npm run build`
- [ ] [Set up project integrations](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://gitlab.com/m3-academy/fase-06/desafio-react-e-typescript/-/settings/integrations)
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
## Collaborate with your team
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
- [ ] [Invite team members and collaborators](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Automatically merge when pipeline succeeds](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
## Test and Deploy
### `npm run eject`
Use the built-in continuous integration in GitLab.
**Note: this is a one-way operation. Once you `eject`, you cant go back!**
- [ ] [Get started with GitLab CI/CD](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
If you arent satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
***
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.
# Editing this README
You dont have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldnt feel obligated to use this feature. However we understand that this tool wouldnt be useful if you couldnt customize it when you are ready for it.
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://www.makeareadme.com/) for this template.
## Learn More
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).

32456
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

52
package.json Normal file
View File

@ -0,0 +1,52 @@
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^16.18.11",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.10",
"dayjs": "^1.11.7",
"formik": "^2.2.9",
"node-sass": "^7.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.6.2",
"react-scripts": "5.0.1",
"typescript": "^4.9.4",
"web-vitals": "^2.1.4",
"yup": "^0.32.11",
"yup-phone": "^1.3.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"prettier": "^2.8.3"
}
}

9
public/assets/Logo.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB

12
public/assets/cart.svg Normal file
View File

@ -0,0 +1,12 @@
<svg width="55" height="55" viewBox="0 0 55 55" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_3751_539)">
<path d="M54.3344 7.95273C54.0351 7.57862 53.5819 7.36086 53.1027 7.36086H11.1231L9.9492 2.27412C9.78398 1.55848 9.14672 1.05151 8.41228 1.05151H1.57728C0.706248 1.05151 0 1.75776 0 2.6289C0 3.50004 0.706248 4.20619 1.57728 4.20619H7.15753L15.1259 38.7358C15.291 39.4515 15.9283 39.9585 16.6628 39.9585H48.2656C49.1367 39.9585 49.8428 39.2522 49.8428 38.3812C49.8428 37.51 49.1366 36.8039 48.2656 36.8039H17.9176L16.7044 31.5462H48.3709C49.1086 31.5462 49.7478 31.0348 49.9097 30.3151L54.6416 9.28438C54.7467 8.81682 54.6338 8.32694 54.3344 7.95273Z" fill="white"/>
<path d="M23.1338 42.0615C19.9449 42.0615 17.3503 44.6559 17.3503 47.845C17.3503 51.0341 19.9448 53.6285 23.1338 53.6285C26.3228 53.6285 28.9173 51.0341 28.9173 47.845C28.9173 44.6559 26.3229 42.0615 23.1338 42.0615Z" fill="white"/>
<path d="M42.0614 42.0615C38.8725 42.0615 36.278 44.6559 36.278 47.845C36.278 51.0341 38.8724 53.6285 42.0614 53.6285C45.2504 53.6285 47.8449 51.0341 47.8449 47.845C47.8449 44.6559 45.2505 42.0615 42.0614 42.0615Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_3751_539">
<rect width="54.68" height="54.68" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,13 @@
<svg width="70" height="71" viewBox="0 0 70 71" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="35" cy="35.2412" r="34" stroke="#303030" stroke-width="2"/>
<g clip-path="url(#clip0_7167_252)">
<path d="M26.8894 27.9592H20.5962C20.3169 27.9592 20.0906 28.1856 20.0906 28.4648V48.682C20.0906 48.9613 20.3169 49.1876 20.5962 49.1876H26.8894C27.1687 49.1876 27.395 48.9613 27.395 48.682V28.4648C27.395 28.1856 27.1687 27.9592 26.8894 27.9592Z" fill="#303030"/>
<path d="M23.7451 17.9087C21.4553 17.9087 19.5924 19.7695 19.5924 22.0568C19.5924 24.3451 21.4553 26.2067 23.7451 26.2067C26.0331 26.2067 27.8944 24.345 27.8944 22.0568C27.8945 19.7695 26.0331 17.9087 23.7451 17.9087Z" fill="#303030"/>
<path d="M42.8964 27.4565C40.3688 27.4565 38.5004 28.5431 37.3671 29.7777V28.4646C37.3671 28.1854 37.1408 27.959 36.8615 27.959H30.8348C30.5555 27.959 30.3291 28.1854 30.3291 28.4646V48.6818C30.3291 48.9611 30.5555 49.1874 30.8348 49.1874H37.1141C37.3934 49.1874 37.6197 48.9611 37.6197 48.6818V38.679C37.6197 35.3083 38.5353 33.9951 40.885 33.9951C43.444 33.9951 43.6473 36.1003 43.6473 38.8524V48.6819C43.6473 48.9612 43.8736 49.1875 44.1529 49.1875H50.4346C50.7139 49.1875 50.9402 48.9612 50.9402 48.6819V37.5924C50.9402 32.5803 49.9845 27.4565 42.8964 27.4565Z" fill="#303030"/>
</g>
<defs>
<clipPath id="clip0_7167_252">
<rect width="31.3478" height="31.3478" fill="white" transform="translate(19.5924 17.8743)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,11 @@
<svg width="70" height="71" viewBox="0 0 70 71" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_7167_232)">
<path d="M38.3557 55.2232V37.329H44.3468L45.2457 30.3532H38.3557V25.9002C38.3557 23.8812 38.9129 22.5052 41.8052 22.5052L45.4882 22.5037V16.2643C44.8513 16.1814 42.665 15.9912 40.1204 15.9912C34.8068 15.9912 31.1691 19.2415 31.1691 25.2093V30.3532H25.1598V37.329H31.1691V55.2232H38.3557Z" fill="#303030"/>
</g>
<circle cx="35" cy="35.2412" r="34" stroke="#303030" stroke-width="2"/>
<defs>
<clipPath id="clip0_7167_232">
<rect width="39.148" height="39.232" fill="white" transform="translate(15.75 15.9912)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -0,0 +1,13 @@
<svg width="70" height="71" viewBox="0 0 70 71" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_7167_237)">
<path d="M44.1992 15.9912H26.5931C20.6142 15.9912 15.75 20.8481 15.75 26.8178V44.3965C15.75 50.3663 20.6142 55.223 26.5931 55.223H44.1992C50.1786 55.223 55.0428 50.3661 55.0428 44.3965V26.8178C55.0431 20.8481 50.1786 15.9912 44.1992 15.9912ZM51.5568 44.3965C51.5568 48.447 48.2563 51.7422 44.1994 51.7422H26.5931C22.5365 51.7424 19.2362 48.447 19.2362 44.3965V26.8178C19.2362 22.7675 22.5365 19.472 26.5931 19.472H44.1992C48.256 19.472 51.5566 22.7675 51.5566 26.8178V44.3965H51.5568Z" fill="#303030"/>
<path d="M35.3964 25.4985C29.8136 25.4985 25.2717 30.0334 25.2717 35.6076C25.2717 41.1816 29.8136 45.7162 35.3964 45.7162C40.9793 45.7162 45.5212 41.1816 45.5212 35.6076C45.5212 30.0334 40.9793 25.4985 35.3964 25.4985ZM35.3964 42.2351C31.7361 42.2351 28.7579 39.262 28.7579 35.6073C28.7579 31.9525 31.7359 28.9791 35.3964 28.9791C39.057 28.9791 42.035 31.9525 42.035 35.6073C42.035 39.262 39.0568 42.2351 35.3964 42.2351Z" fill="#303030"/>
<path d="M45.9459 22.5471C45.2742 22.5471 44.6144 22.8186 44.14 23.2943C43.6633 23.7677 43.3893 24.4268 43.3893 25.0997C43.3893 25.7706 43.6635 26.4294 44.14 26.9051C44.6141 27.3785 45.2742 27.6523 45.9459 27.6523C46.6199 27.6523 47.2776 27.3785 47.7541 26.9051C48.2305 26.4294 48.5024 25.7704 48.5024 25.0997C48.5024 24.4268 48.2305 23.7677 47.7541 23.2943C47.2799 22.8186 46.6199 22.5471 45.9459 22.5471Z" fill="#303030"/>
</g>
<circle cx="35" cy="35.2412" r="34" stroke="#303030" stroke-width="2"/>
<defs>
<clipPath id="clip0_7167_237">
<rect width="39.2931" height="39.232" fill="white" transform="translate(15.75 15.9912)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,5 @@
<svg width="28" height="23" viewBox="0 0 28 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M26.25 19.0001H1.75002C0.783509 19.0001 0 19.7836 0 20.7501C0 21.7166 0.783508 22.5001 1.75002 22.5001H26.25C27.2165 22.5001 28 21.7166 28 20.7501C28 19.7836 27.2165 19.0001 26.25 19.0001Z" fill="white"/>
<path d="M26.25 9.5H1.75002C0.783509 9.5 0 10.2835 0 11.25C0 12.2165 0.783508 13 1.75002 13H26.25C27.2165 13 28 12.2165 28 11.25C28 10.2835 27.2165 9.5 26.25 9.5Z" fill="white"/>
<path d="M26.25 0H1.75002C0.783509 0 0 0.783509 0 1.75002C0 2.71652 0.783508 3.50003 1.75002 3.50003H26.25C27.2165 3.50003 28 2.71652 28 1.75002C28 0.783509 27.2165 0 26.25 0Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,4 @@
<svg width="70" height="71" viewBox="0 0 70 71" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="35" cy="35.2412" r="34" stroke="#303030" stroke-width="2"/>
<path d="M59.9829 20.5539C58.1894 21.3406 56.2784 21.8621 54.286 22.1153C56.3357 20.8915 57.9 18.9684 58.6355 16.6505C56.7245 17.7899 54.6145 18.5947 52.3659 19.0438C50.5514 17.1117 47.9652 15.915 45.1439 15.915C39.6701 15.915 35.2633 20.358 35.2633 25.8047C35.2633 26.5884 35.3296 27.3419 35.4924 28.0593C27.2726 27.6584 19.9993 23.7188 15.1133 17.7175C14.2602 19.1975 13.7599 20.8915 13.7599 22.7151C13.7599 26.1393 15.5232 29.1746 18.1516 30.9319C16.5631 30.9017 15.0048 30.4405 13.6845 29.7141C13.6845 29.7443 13.6845 29.7834 13.6845 29.8226C13.6845 34.6273 17.1117 38.6181 21.6059 39.5374C20.8011 39.7575 19.924 39.863 19.0137 39.863C18.3807 39.863 17.7417 39.8268 17.1418 39.6942C18.4229 43.6096 22.058 46.4882 26.3804 46.5816C23.0165 49.2131 18.7454 50.7985 14.1216 50.7985C13.3108 50.7985 12.5331 50.7624 11.7554 50.6629C16.1351 53.4872 21.3256 55.0998 26.923 55.0998C45.1168 55.0998 55.0637 40.0287 55.0637 26.9651C55.0637 26.5281 55.0486 26.1061 55.0275 25.6871C56.9897 24.2946 58.6385 22.5554 59.9829 20.5539Z" fill="#303030"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,4 @@
<svg width="70" height="71" viewBox="0 0 70 71" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="35" cy="35.2412" r="34" stroke="#303030" stroke-width="2"/>
<path d="M55.6053 24.7387C55.0894 22.8206 53.5771 21.3086 51.6593 20.7921C48.1557 19.8335 34.1411 19.8335 34.1411 19.8335C34.1411 19.8335 20.127 19.8335 16.6235 20.7558C14.7425 21.2717 13.1934 22.8209 12.6774 24.7387C11.7554 28.242 11.7554 35.5074 11.7554 35.5074C11.7554 35.5074 11.7554 42.8094 12.6774 46.2761C13.1939 48.1939 14.7056 49.7059 16.6237 50.2224C20.1639 51.1813 34.1417 51.1813 34.1417 51.1813C34.1417 51.1813 48.1557 51.1813 51.6593 50.259C53.5774 49.7428 55.0894 48.2308 55.6059 46.313C56.5276 42.8094 56.5276 35.5443 56.5276 35.5443C56.5276 35.5443 56.5645 28.242 55.6053 24.7387ZM29.6792 42.2195V28.7954L41.333 35.5074L29.6792 42.2195Z" fill="#303030"/>
</svg>

After

Width:  |  Height:  |  Size: 847 B

View File

@ -0,0 +1,10 @@
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_3751_533)">
<path d="M25.7949 22.6886C27.5246 20.3265 28.5592 17.4252 28.5592 14.2799C28.5592 6.40637 22.1531 0.000244141 14.2796 0.000244141C6.40606 0.000244141 0 6.40637 0 14.2799C0 22.1534 6.40613 28.5596 14.2797 28.5596C17.4249 28.5596 20.3266 27.5248 22.6886 25.7951L32.0435 35.15L35.15 32.0436C35.15 32.0435 25.7949 22.6886 25.7949 22.6886ZM14.2797 24.1658C8.82824 24.1658 4.39377 19.7313 4.39377 14.2799C4.39377 8.82848 8.82824 4.39401 14.2797 4.39401C19.7311 4.39401 24.1655 8.82848 24.1655 14.2799C24.1655 19.7313 19.731 24.1658 14.2797 24.1658Z" fill="#292929"/>
</g>
<defs>
<clipPath id="clip0_3751_533">
<rect width="35.15" height="35.15" rx="5" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 821 B

43
public/index.html Normal file
View File

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>

25
public/manifest.json Normal file
View File

@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}

3
public/robots.txt Normal file
View File

@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:

9
src/App.test.tsx Normal file
View File

@ -0,0 +1,9 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});

10
src/App.tsx Normal file
View File

@ -0,0 +1,10 @@
import './global.scss';
import DefaultRoutes from './routes';
function App() {
return (
<DefaultRoutes />
);
}
export default App;

View File

@ -0,0 +1,54 @@
import { useState } from "react"
import useMobile from "../../utils/useMobile"
interface ILink {
highlight: boolean
label: string
}
interface IProps {
title: string,
linkList: ILink[]
}
const FooterLinks: React.FC<IProps> = ({ title, linkList }) => {
const { isMobile } = useMobile()
const [open, setOpen] = useState(false)
console.log('open', open)
return (
<div className="footer-wrapper__list">
{
isMobile ? <button onClick={() => setOpen(!open)}>{title}</button> : <h2 className="footer-wrapper__title">{title}</h2>
}
{
!isMobile ?
<ul className="footer-wrapper__list-style" >
{
linkList.map(({ highlight, label }, idx) => (
<li key={idx} className={`${highlight ? 'highlight' : ''} footer-wrapper__item`}>
<a href="/">{label}</a>
</li>
))
}
</ul>
: (
<ul className="footer-wrapper__list-style mobile" style={{ transform: `${open ? 'scaleY(1)' : 'scaleY(0)'}`, height: `${open ? 'max-content' : '0'} ` }}>
{
linkList.map(({ highlight, label }, idx) => (
<li key={idx} className={`${highlight ? 'highlight' : ''} footer-wrapper__item`}>
<a href="/">{label}</a>
</li>
))
}
</ul>
)
}
</div>
)
}
export default FooterLinks

View File

@ -0,0 +1,228 @@
.footer-form {
//margin-top: 84px;
border-top: 1px solid #000000;
border-bottom: 1px solid #000000;
padding: 16px;
&__title {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-size: 36px;
line-height: 42px;
letter-spacing: 0.05em;
color: #303030;
display: flex;
justify-content: center;
}
&__input {
width: 100%;
max-width: 668px;
padding: 16px;
}
&__wrapper {
width: 100%;
max-width: 922px;
display: flex;
margin: auto;
@media (max-width: 1024px) {
flex-direction: column;
}
}
&__button {
padding: 14px 20px;
width: 100%;
max-width: 246px;
background: #000000;
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
border-radius: 4px;
color: #ffffff;
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-size: 24px;
line-height: 28px;
letter-spacing: 0.05em;
@media (max-width: 1024px) {
width: 100%;
max-width: 100%;
margin-top: 16px;
}
}
}
.footer-wrapper {
width: 100%;
&__links {
padding-top: 50px;
padding-bottom: 50px;
display: flex;
justify-content: space-between;
width: 100%;
@media (max-width: 1024px) {
flex-direction: column;
}
}
&__list-img {
display: flex;
list-style: none;
}
&__list-icon {
padding: 5px;
}
&__description {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 28px;
line-height: 33px;
color: #303030;
}
&__title {
margin-bottom: 12px;
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-size: 28px;
line-height: 33px;
text-transform: uppercase;
color: #303030;
}
&__item {
margin-bottom: 12px;
a {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 24px;
line-height: 28px;
text-transform: capitalize;
color: #303030;
}
}
&__list-style {
list-style: none;
&.mobile {
transform: scaleY(0);
height: 0;
transform-origin: top;
transition: 0.2s ease-in-out;
}
}
}
.footerCheckout {
&__wrapper {
display: flex;
justify-content: space-between;
background: #000000;
align-items: center;
padding: 15px 100px;
color: #ffffff;
@media (max-width: 1024px) {
flex-direction: column;
padding: 15px 16px;
}
}
&__address {
max-width: 467px;
width: 100%;
@media (max-width: 1024px) {
max-width: 234px;
font-size: 10px;
}
span {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 23px;
text-transform: capitalize;
color: #ffffff;
}
}
&__stamps {
width: 100%;
max-width: 516px;
align-items: center;
display: flex;
justify-self: center;
list-style: none;
margin: 0;
@media (max-width: 1024px) {
flex-wrap: wrap;
}
&__divider {
background-color: #c4c4c4;
display: inline-block;
height: 24px;
margin: 0 8px;
width: 1px;
}
}
&__img-card {
width: 70px;
margin: 6px;
}
&__vtex-icon {
width: 106px;
}
&__developedBy {
align-items: center;
display: flex;
list-style-type: none;
margin: 0;
li:last-child {
margin-left: 16px;
a img {
max-width: 55px;
}
}
a {
align-items: center;
color: #c4c4c4;
display: flex;
font-family: 'Roboto';
font-style: normal;
font-weight: normal;
font-size: 10px;
line-height: 12px;
text-decoration: none;
img {
max-width: 87px;
}
span {
margin-right: 8px;
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 18px;
line-height: 25px;
color: #ffffff;
}
}
}
}

View File

@ -0,0 +1,114 @@
import FooterLinks from '../footer-links'
import './footer.scss'
const Footer = () => {
return <>
<div className='footer-form'>
<h1 className="footer-form__title">Assine nossa Newsletter</h1>
<div className="footer-form__wrapper">
<input type="email" placeholder="E-mail" className="footer-form__input" />
<button className="footer-form__button">ENVIAR</button>
</div>
</div>
<div className="footer__wrapper">
<div className="footer-wrapper__links container">
<FooterLinks title='Institucional' linkList={[
{ label: 'Quem Somos', highlight: false },
{ label: 'Política de Privacidade', highlight: false },
{ label: 'Segurança', highlight: false },
{ label: 'Seja um Revendedor', highlight: true }
]} />
<FooterLinks title='DÚVIDAS' linkList={[
{ label: 'Entrega', highlight: false },
{ label: 'Pagamento', highlight: false },
{ label: 'Trocas e Devoluções', highlight: false },
{ label: 'Dúvidas Frequentes', highlight: true }
]} />
<FooterLinks title='Fale Conosco' linkList={[
{ label: 'Atendimento ao Consumidor', highlight: false },
{ label: '(11) 4159-9504', highlight: false },
{ label: 'Atendimento Online', highlight: false },
{ label: '(11) 99433-8825', highlight: true }
]} />
<div className="footer-wrapper__list">
<ul className='footer-wrapper__list-img'>
<li className='footer-wrapper__list-icon'><img src="./assets/footer-img/facebook-icon.svg" alt="" /></li>
<li className='footer-wrapper__list-icon'><img src="./assets/footer-img/instagram-icon.svg" alt="" /></li>
<li className='footer-wrapper__list-icon'><img src="./assets/footer-img/twitter-icon.svg" alt="" /></li>
<li className='footer-wrapper__list-icon'><img src="./assets/footer-img/youtube-icon.svg" alt="" /></li>
<li className='footer-wrapper__list-icon'><img src="./assets/footer-img/LinkedIn-icon.svg" alt="" /></li>
</ul>
<span className='footer-wrapper__description'>www.loremipsum.com</span>
</div>
</div>
<div className="footerCheckout__wrapper">
<div className="footerCheckout__address">
<span>Lorem ipsum dolor sit amet, consectetur adipiscing
elit, sed do eiusmod tempor</span>
</div>
<ul className="footerCheckout__stamps">
<li>
<img className='footerCheckout__img-card' src="./assets/footer-img/masterCardM3Academy.png" alt="Cartao masterCard" />
</li>
<li>
<img className='footerCheckout__img-card' src="./assets/footer-img/visaM3Academy.png" alt="Cartao Visa" />
</li>
<li>
<img className='footerCheckout__img-card' src="./assets/footer-img/amexM3Academy.png" alt="American Express" />
</li>
<li>
<img className='footerCheckout__img-card' src="./assets/footer-img/eloM3Academy.png" alt="Cartao ELO" />
</li>
<li>
<img className='footerCheckout__img-card' src="./assets/footer-img/hiperCardM3Academy.png" alt="Cartao Hipercard" />
</li>
<li>
<img className='footerCheckout__img-card' src="./assets/footer-img/payPalM3Academy.png" alt="PayPal" />
</li>
<li>
<img className='footerCheckout__img-card' src="./assets/footer-img/boletoM3Academy.png" alt="BOLETO DE PAGAMENTO" />
</li>
<li>
<span className='footerCheckout__stamps__divider'></span>
</li>
<li>
<span className="footerCheckout__payments"><img className='footerCheckout__vtex-icon' src="./assets/footer-img/vtex-certified.png" alt="" /></span>
</li>
</ul>
<ul className="footerCheckout__developedBy">
<li>
<a href="https://vtex.com/br-pt/">
<span>Powered By</span>
<img src="./assets/footer-img/logo-vtex.png" alt="" />
</a>
</li>
<li>
<a href="https://agenciam3.com/">
<span>Developed By</span>
<img src="./assets/footer-img/logo-m3.png" alt="" />
</a>
</li>
</ul>
</div>
</div>
</>
}
export default Footer;

View File

@ -0,0 +1,67 @@
.header-menu {
&__wrapper {
width: 100%;
background: #000000;
display: flex;
align-items: center;
flex-direction: column;
}
&__top {
width: 100%;
display: flex;
justify-content: space-between;
padding-top: 22px;
padding-bottom: 22px;
}
&__logo {
width: 100%;
max-width: 266px;
@media (max-width: 1024px) {
max-width: 136px;
}
}
&__cart {
display: flex;
justify-content: center;
align-items: center;
a {
display: flex;
img {
width: 100%;
}
}
@media (max-width: 1024px) {
width: 28px;
}
}
&__mobile {
background: #000000;
.header_top {
display: flex;
padding: 25px 0;
justify-content: space-between;
}
}
}
.header-button-cart {
margin-right: 55px;
background-color: #000000;
border: none;
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 28px;
line-height: 33px;
text-transform: uppercase;
color: #ffffff;
}

View File

@ -0,0 +1,54 @@
import { useState } from 'react';
import useMobile from '../../utils/useMobile';
import Menu from '../menu-sub';
import InputSearch from '../search/inputs';
import './header.scss';
const Header = () => {
const { isMobile } = useMobile()
const [open, setOpen] = useState(false)
return (
<header>
{!isMobile ?
<div className='header-menu__wrapper '>
<div className="header-menu__top container">
<img className='header-menu__logo' src="/assets/Logo.svg" alt="Logo M3 Academy" />
<InputSearch />
<div className='header-menu__cart' >
<button className='header-button-cart'>ENTRAR</button>
<a href="/"><img className='header-menu__icon-cart' src="./assets/cart.svg" alt="Icone do carrinho" /></a>
</div>
</div>
<Menu />
</div>
: (
<>
<div className='header-menu__mobile container' >
<div className="header_top">
<button className='menu-mobile' onClick={() => setOpen(true)}> <img src="./assets/footer-img/menu-mobile.svg" alt="" /> </button>
<img className='header-menu__logo' src="/assets/Logo.svg" alt="Logo M3 Academy" />
<div className='header-menu__cart' >
<a href="/"><img className='header-menu__icon-cart' src="./assets/cart.svg" alt="Icone do carrinho" /></a>
</div>
</div>
<InputSearch />
<Menu open={open} setOpen={setOpen} />
</div>
{open && <div className="background" onClick={() => setOpen(false)}></div>}
</>
)}
</header>
)
}
export default Header;

15
src/components/layout.tsx Normal file
View File

@ -0,0 +1,15 @@
import React from "react";
import Footer from "./footer";
import Header from "./header";
const Layout: React.FC<any> = ({ children }) => {
return (
<>
<Header />
{children}
<Footer />
</>
);
}
export default Layout;

View File

@ -0,0 +1,28 @@
import useMobile from '../../utils/useMobile';
import './sub-menu.scss';
const Menu = ({ open, setOpen }: { open?: boolean, setOpen?: (open: boolean) => void }) => {
const { isMobile } = useMobile()
return (!isMobile ?
<div className="header-sub__menu container" >
<a className="header-sub__link" href="/">cursos</a>
<a className="header-sub__link" href="/">SAIBA MAIS</a>
<a className="header-sub__link" href="/">INSTITUCIONAIS</a>
</div>
: (
<div className="header-sub__mobile" style={{ transform: `${open ? 'translateX(0)' : 'translateX(-100%)'}` }}>
<div className="header-sub__header">
<span>Entrar</span>
<button onClick={() => setOpen && setOpen(false)}>X</button>
</div>
<ul>
<li> <a className="header-sub__link" href="/">cursos</a></li>
<li><a className="header-sub__link" href="/">SAIBA MAIS</a></li>
<li><a className="header-sub__link" href="/">INSTITUCIONAIS</a></li>
</ul>
</div>
)
)
}
export default Menu;

View File

@ -0,0 +1,73 @@
.header-sub {
&__menu {
display: flex;
align-items: center;
background: #000000;
padding-top: 14px;
padding-bottom: 14px;
border-top: 1px solid #c4c4c4;
width: 100%;
}
&__link {
margin-right: 55px;
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-size: 28px;
line-height: 33px;
text-decoration: none;
text-transform: uppercase;
color: #ffffff;
cursor: pointer;
}
&__mobile {
background: #ffffff;
position: fixed;
left: 0;
top: 0;
height: 100%;
width: 90%;
z-index: 99999;
transform-origin: left;
transition: 0.2s ease-in-out;
}
&__header {
background: #000;
padding: 30px 16px;
display: flex;
justify-content: space-between;
span {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 16px;
text-transform: uppercase;
color: #ffffff;
}
button {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 16px;
text-transform: uppercase;
color: #ffffff;
transform: scale(1.5, 1.1);
}
}
}
.background {
position: fixed;
top: 0;
left: 0;
background: rgba($color: #000000, $alpha: 0.8);
width: 100%;
height: 100%;
}

View File

@ -0,0 +1,12 @@
import './search.scss';
const InputSearch = () => {
return (
<div className="header-menu__search">
<input type="search" name="search" className="header-menu__input" placeholder="Buscar" />
<button className="header-menu__button"><img className='header-menu__icon' src="./assets/search-icon.svg" alt="Logo da busca do menu" /></button>
</div>
)
}
export default InputSearch;

View File

@ -0,0 +1,53 @@
.header-menu {
&__search {
position: relative;
width: 100%;
max-width: 515px;
height: 57px;
@media (max-width: 1024px) {
max-width: 100%;
}
input {
@media (max-width: 1024px) {
height: 36px;
font-size: 14px;
line-height: 16px;
padding: 10px 16px;
}
}
}
&__input {
width: 100%;
padding: 10px;
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 28px;
line-height: 33px;
background: #ffffff;
border: 2px solid #f0f0f0;
border-radius: 5px;
color: #c4c4c4;
}
&__button {
position: absolute;
top: 10px;
right: 10px;
z-index: 10;
border: none;
background: transparent;
outline: none;
img {
width: 100%;
}
@media (max-width: 1024px) {
width: 18px;
}
}
}

View File

@ -0,0 +1,15 @@
import { ReactNode } from "react";
interface IProps {
title: string;
children: ReactNode;
}
const Section: React.FC<IProps> = ({ title, children }) => {
return <div className="section-list__content">
<h2 className="section-list__title">{title}</h2>
{children}
</div>
}
export default Section;

View File

@ -0,0 +1,159 @@
import { useFormik } from "formik";
import { string, number, object, bool } from 'yup'
import { FC } from 'react'
import './singUp.scss'
import dayjs from "dayjs";
const SignUpSchema = object().shape({
nome: string()
.min(2, "No mínimo 2 caractéres")
.max(30, "No máximo 30 caractéres")
.required("*Campo Obrigatório"),
email: string().email().required("*Campo Obrigatório"),
cpf: number()
.integer("Cpf deve ser um número inteiro")
.required("*Campo Obrigatório"),
birthday: string()
.test("date", "O formato da data deve ser DD/MM/YYYY", function (value) {
return dayjs(value, "DD/MM/YYYY").isValid();
})
.required("*Campo Obrigatório"),
telefone: number()
.integer("Telefone deve ser um número inteiro")
.required("*Campo Obrigatório"),
instagram: string()
.required("*Campo Obrigatório"),
accept: bool().oneOf([true], "*Campo Obrigatório"),
});
interface MyFormValues {
nome: string;
email: string;
cpf: string;
birthday: string
telefone: string;
instagram: string;
accept: boolean
}
const initialValues: MyFormValues = {
nome: "",
email: "",
cpf: "",
birthday: '',
telefone: "",
instagram: "",
accept: false
};
const SignUp: FC = () => {
const formik = useFormik({
validationSchema: SignUpSchema,
validateOnBlur: false,
validateOnChange: true,
initialValues,
onSubmit: (values) => {
formik.handleReset(initialValues)
},
});
console.log('values', formik)
return (
<form className="section-list__contact" onSubmit={formik.handleSubmit}>
<div className="section-list__input">
<label htmlFor="nome">Nome</label>
{formik.errors.nome && <span className="error">{formik.errors.nome}</span>}
<input
id="nome"
name="nome"
type="text"
placeholder="Seu nome completo"
onChange={formik.handleChange}
value={formik.values.nome}
/>
</div>
<div className="section-list__input">
<label htmlFor="email">E-mail</label>
{formik.errors.email && <span className="error">{formik.errors.email}</span>}
<input
id="email"
name="email"
type="email"
placeholder="Seu e-mail"
onChange={formik.handleChange}
value={formik.values.email}
/>
</div>
<div className="section-list__input">
<label htmlFor="cpf">Cpf</label>
{formik.errors.cpf && <span className="error">{formik.errors.cpf}</span>}
<input
id="cpf"
name="cpf"
type="text"
placeholder="000.000.000-00"
onChange={formik.handleChange}
value={formik.values.cpf}
/>
</div>
<div className="section-list__input">
<label htmlFor="birthday">Data de Nascimento</label>
{formik.errors.birthday && <span className="error">{formik.errors.birthday}</span>}
<input
id="birthday"
name="birthday"
placeholder="00.00.0000"
type="text"
onChange={formik.handleChange}
value={formik.values.birthday}
/>
</div>
<div className="section-list__input">
<label htmlFor="telefone">Telefone</label>
{formik.errors.telefone && <span className="error">{formik.errors.telefone}</span>}
<input
id="telefone"
name="telefone"
type="phone"
placeholder="(00) 00000-0000"
onChange={formik.handleChange}
value={formik.values.telefone}
/>
</div>
<div className="section-list__input">
<label htmlFor="instagram">Instagram</label>
{formik.errors.instagram && <span className="error">{formik.errors.instagram}</span>}
<input
id="instagram"
name="instagram"
type="text"
placeholder="@seuuser"
onChange={formik.handleChange}
value={formik.values.instagram}
/>
</div>
<div className="section-list__input checkbox">
<label htmlFor="accept"><span style={{ color: 'red' }}>*</span> Declaro que li e aceito</label>
<input
id="accept"
name="accept"
type="checkbox"
onChange={formik.handleChange}
checked={formik.values.accept}
/>
</div>
{formik.errors.accept && <span className="error">{formik.errors.accept}</span>}
<button className="section-list__submit" type="submit">CADASTRE-SE</button>
</form>
);
}
export default SignUp;

View File

@ -0,0 +1,85 @@
.section-list {
&__content {
width: 100%;
}
&__contact {
width: 100%;
}
&__input {
display: flex;
flex-direction: column;
input {
width: 100%;
background: #ffffff;
border: 1px solid #100d0e;
border-radius: 25px;
padding: 15px 20px;
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 28px;
line-height: 33px;
color: #b9b7b7;
}
label {
font-family: 'Roboto', sans-serif;
font-style: normal;
font-weight: 400;
font-size: 28px;
line-height: 33px;
color: #100d0e;
margin: 12px 0;
}
&.checkbox {
margin: 0 auto;
display: flex;
width: max-content;
flex-direction: row;
align-items: center;
label {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 28px;
line-height: 33px;
text-decoration: underline;
}
input {
width: 36px;
height: 36px;
margin-left: 4px;
}
}
}
&__submit {
background: #000000;
border-radius: 25px;
width: 100%;
padding: 15px 20px;
margin-top: 15px;
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 32px;
line-height: 38px;
letter-spacing: 0.05em;
color: #ffffff;
}
}
.error {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 24px;
line-height: 28px;
text-align: right;
color: #ff0000;
margin-left: auto;
}

View File

@ -0,0 +1,15 @@
interface ITab {
tabList: string[]
setTab: (state: string) => void
tabState: string
}
const Tabs = ({ tabList, setTab, tabState }: ITab) => {
return <div className="section-container__list">
{
tabList.map((tab, idx) => <button key={idx} className={`section-list__button ${tabState === tab ? 'active' : ''}`} onClick={() => setTab(tab)}>{tab}</button>)
}
</div>
}
export default Tabs

View File

@ -0,0 +1,9 @@
const Sobre = () => {
return <span>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.
Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
</span>
}
export default Sobre;

22
src/global.scss Normal file
View File

@ -0,0 +1,22 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Poppins:wght@400;700&family=Roboto:wght@400;700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
button {
border: none;
background: none;
}
}
body {
font-family: 'Roboto';
}
.container {
padding: 0 100px;
@media (max-width: 1024px) {
padding: 0 16px;
}
}

13
src/index.scss Normal file
View File

@ -0,0 +1,13 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

20
src/index.tsx Normal file
View File

@ -0,0 +1,20 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.scss';
import App from './App';
import reportWebVitals from './reportWebVitals';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();

1
src/modules/declaration.d.ts vendored Normal file
View File

@ -0,0 +1 @@
declare module '*.scss';

83
src/pages/home/home.scss Normal file
View File

@ -0,0 +1,83 @@
.section-container {
display: flex;
margin-bottom: 84px;
@media (max-width: 1024px) {
flex-direction: column;
}
&__title {
font-family: 'Roboto';
font-size: 48px;
line-height: 56px;
letter-spacing: 0.1em;
text-transform: uppercase;
text-align: center;
color: #292929;
margin-bottom: 80px;
}
&__list {
min-width: 590px;
display: flex;
flex-direction: column;
@media (max-width: 1024px) {
min-width: 100%;
}
}
}
.section-list {
&__content {
padding-left: 30px;
border-left: 1px solid #303030;
@media (max-width: 1024px) {
padding-left: 0;
border-left: none;
margin-top: 30px;
}
}
&__title {
margin-bottom: 12px;
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-size: 48px;
line-height: 56px;
color: #292929;
}
&__description {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 26px;
line-height: 30px;
color: #7d7d7d;
&:not(:last-child) {
margin-bottom: 12px;
}
}
&__button {
padding: 10px 16px;
text-align: initial;
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 32px;
line-height: 38px;
color: #7d7d7d;
}
}
.active {
background: #000000;
border: 1px solid #000000;
color: #fff;
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-size: 32px;
line-height: 38px;
color: #ffffff;
}

86
src/pages/home/index.tsx Normal file
View File

@ -0,0 +1,86 @@
import { memo, useState } from "react";
import Layout from "../../components/layout";
import Section from "../../components/section";
import SignUp from "../../components/singUp";
import Tabs from "../../components/tabs";
import './home.scss';
const Home = () => {
const [tab, setTab] = useState('Sobre')
return (
<Layout >
<h1 className="section-container__title">institucional</h1>
<div className="section-container container">
<Tabs tabList={['Sobre', 'Forma de Pagamento', 'Entrega', 'Troca e Devolução', 'Segurança e Privacidade', 'Contato']} setTab={setTab} tabState={tab} />
{tab === 'Sobre' && (
<Section title="Sobre" >
<p className="section-list__description">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p className="section-list__description">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p>
<p className="section-list__description">Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</p>
</Section>
)}
{tab === 'Forma de Pagamento' && (
<Section title="Forma de Pagamento" >
<p className="section-list__description">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p className="section-list__description">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p>
<p className="section-list__description">Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</p>
</Section>
)}
{tab === 'Entrega' && (
<Section title="Entrega" >
<p className="section-list__description">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p className="section-list__description">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p>
<p className="section-list__description">Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</p>
</Section>
)}
{tab === 'Troca e Devolução' && (
<Section title="Troca e Devolução" >
<p className="section-list__description">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p className="section-list__description">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p>
<p className="section-list__description">Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</p>
</Section>
)}
{tab === 'Segurança e Privacidade' && (
<Section title="Segurança e Privacidade" >
<p className="section-list__description">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p className="section-list__description">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p>
<p className="section-list__description">Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</p>
</Section>
)}
{tab === 'Contato' && (
<Section title="Preencha o formulário" >
<SignUp />
</Section>
)}
</div>
</Layout>
)
}
export default memo(Home);

1
src/react-app-env.d.ts vendored Normal file
View File

@ -0,0 +1 @@
/// <reference types="react-scripts" />

15
src/reportWebVitals.ts Normal file
View File

@ -0,0 +1,15 @@
import { ReportHandler } from 'web-vitals';
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
};
export default reportWebVitals;

16
src/routes.tsx Normal file
View File

@ -0,0 +1,16 @@
import React from "react";
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import Home from "./pages/home";
function DefaultRoutes () {
return(
<Router >
<Routes>
<Route path="/" element= { <Home/> } />
<Route path="/pagina-2" element= { <Home/> } />
</Routes>
</Router>
)
}
export default DefaultRoutes;

5
src/setupTests.ts Normal file
View File

@ -0,0 +1,5 @@
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';

33
src/utils/useMobile.ts Normal file
View File

@ -0,0 +1,33 @@
import { useEffect, useState } from 'react';
const useMobile = () => {
const [isMobile, setIsMobile] = useState<boolean>(false);
useEffect(() => {
const windowWidthOnLoad = window.innerWidth;
if (windowWidthOnLoad > 1024) {
setIsMobile(false);
}
if (windowWidthOnLoad < 1024) {
setIsMobile(true);
}
window.addEventListener('resize', (e: any) => {
const windowWidth = e.target.innerWidth;
if (windowWidth > 1024) {
setIsMobile(false);
}
if (windowWidth < 1024) {
setIsMobile(true);
}
});
}, []);
return { isMobile };
};
export default useMobile;

29
tsconfig.json Normal file
View File

@ -0,0 +1,29 @@
{
"[typescriptreact]": {
"editor.formatOnSave": true
},
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": [
"src"
]
}

10581
yarn.lock Normal file

File diff suppressed because it is too large Load Diff