|
| 1 | +In this project, let's build a **Routing Practice** app by applying the concepts we have learned till now. |
| 2 | + |
| 3 | +### Refer to the image below: |
| 4 | + |
| 5 | +<br/> |
| 6 | +<div style="text-align: center;"> |
| 7 | + <img src="https://assets.ccbp.in/frontend/content/react-js/routing-practice-output.gif" alt="routing-practice-desktop-output" style="max-width:70%;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.12)"> |
| 8 | +</div> |
| 9 | +<br/> |
| 10 | + |
| 11 | +### Design Files |
| 12 | + |
| 13 | +<details> |
| 14 | +<summary>Click to view</summary> |
| 15 | + |
| 16 | +- [Extra Small (Size < 576px), Small (Size >= 576px), Medium (Size >= 768px)](https://assets.ccbp.in/frontend/content/react-js/routing-practice-sm-output.png) |
| 17 | +- [Large (Size >= 992px) and Extra Large (Size >= 1200px)](https://assets.ccbp.in/frontend/content/react-js/routing-practice-lg-output.png) |
| 18 | + |
| 19 | +</details> |
| 20 | + |
| 21 | +### Set Up Instructions |
| 22 | + |
| 23 | +<details> |
| 24 | +<summary>Click to view</summary> |
| 25 | + |
| 26 | +- Download dependencies by running `npm install` |
| 27 | +- Start up the app using `npm start` |
| 28 | +</details> |
| 29 | + |
| 30 | +### Completion Instructions |
| 31 | + |
| 32 | +<details> |
| 33 | +<summary>Functionality to be added</summary> |
| 34 | +<br/> |
| 35 | + |
| 36 | +The app must have the following functionalities |
| 37 | + |
| 38 | +- When the **About** link in the header is clicked, then the page should navigate to the `AboutRoute` |
| 39 | +- When the **Contact** link in the header is clicked, then the page should navigate to the `ContactRoute` |
| 40 | +- When the **Home** link in the header is clicked, then the page should navigate back to the `HomeRoute` |
| 41 | +- When an undefined path is provided in the URL, then the page should navigate to the `NotFoundRoute` |
| 42 | + |
| 43 | +</details> |
| 44 | + |
| 45 | +<details> |
| 46 | +<summary>Components Structure</summary> |
| 47 | + |
| 48 | +<br/> |
| 49 | +<div style="text-align: center;"> |
| 50 | + <img src="https://assets.ccbp.in/frontend/content/react-js/routing-practice-home-about-component-breakdown-structure.png" alt="" style="max-width:100%;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.12)"> |
| 51 | +</div> |
| 52 | +<br/> |
| 53 | +<div style="text-align: center;"> |
| 54 | + <img src="https://assets.ccbp.in/frontend/content/react-js/routing-practice-contact-not-found-component-breakdown-structure.png" alt="" style="max-width:100%;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.12)"> |
| 55 | +</div> |
| 56 | +</details> |
| 57 | + |
| 58 | +<details> |
| 59 | +<summary>Implementation Files</summary> |
| 60 | +<br/> |
| 61 | + |
| 62 | +Use these files to complete the implementation: |
| 63 | + |
| 64 | +- `src/components/App.js` |
| 65 | +- `src/components/App.css` |
| 66 | +- `src/components/Header/index.js` |
| 67 | +- `src/components/Header/index.css` |
| 68 | +- `src/components/Home/index.js` |
| 69 | +- `src/components/Home/index.css` |
| 70 | +- `src/components/About/index.js` |
| 71 | +- `src/components/About/index.css` |
| 72 | +- `src/components/Contact/index.js` |
| 73 | +- `src/components/Contact/index.css` |
| 74 | +- `src/components/NotFound/index.js` |
| 75 | +- `src/components/NotFound/index.css` |
| 76 | +</details> |
| 77 | + |
| 78 | +### Important Note |
| 79 | + |
| 80 | +<details> |
| 81 | +<summary>Click to view</summary> |
| 82 | + |
| 83 | +<br/> |
| 84 | + |
| 85 | +**The following instructions are required for the tests to pass** |
| 86 | + |
| 87 | +- `HomeRoute` should consist of "/" in the URL path |
| 88 | +- `AboutRoute` should consist of "/about" in the URL path |
| 89 | +- `ContactRoute` should consist of "/contact" in the URL path |
| 90 | +- No need to use the `BrowserRouter` in `App.js` as we have already included in `index.js` file |
| 91 | + |
| 92 | +</details> |
| 93 | + |
| 94 | +### Resources |
| 95 | + |
| 96 | +<details> |
| 97 | +<summary>Image URLs</summary> |
| 98 | + |
| 99 | +- [https://assets.ccbp.in/frontend/react-js/wave-logo-img.png](https://assets.ccbp.in/frontend/react-js/wave-logo-img.png) alt should be **wave** |
| 100 | +- [https://assets.ccbp.in/frontend/react-js/home-blog-img.png](https://assets.ccbp.in/frontend/react-js/home-blog-img.png) alt should be **home** |
| 101 | +- [https://assets.ccbp.in/frontend/react-js/about-blog-img.png](https://assets.ccbp.in/frontend/react-js/about-blog-img.png) alt should be **about** |
| 102 | +- [https://assets.ccbp.in/frontend/react-js/contact-blog-img.png](https://assets.ccbp.in/frontend/react-js/contact-blog-img.png) alt should be **contact** |
| 103 | +- [https://assets.ccbp.in/frontend/react-js/not-found-blog-img.png](https://assets.ccbp.in/frontend/react-js/not-found-blog-img.png) alt should be **not found** |
| 104 | + |
| 105 | +</details> |
| 106 | + |
| 107 | +<details> |
| 108 | +<summary>Colors</summary> |
| 109 | + |
| 110 | +<br/> |
| 111 | + |
| 112 | +<div style="background-color: #6d396b; width: 150px; padding: 10px; color: white">Hex: #6d396b</div> |
| 113 | +<div style="background-color: #555555; width: 150px; padding: 10px; color: white">Hex: #555555</div> |
| 114 | +<div style="background-color: #551e53; width: 150px; padding: 10px; color: white">Hex: #551e53</div> |
| 115 | +<div style="background-color: #12022f; width: 150px; padding: 10px; color: white">Hex: #12022f</div> |
| 116 | + |
| 117 | +</details> |
| 118 | + |
| 119 | +<details> |
| 120 | +<summary>Font-families</summary> |
| 121 | + |
| 122 | +- Roboto |
| 123 | + |
| 124 | +</details> |
| 125 | + |
| 126 | +> ### _Things to Keep in Mind_ |
| 127 | +> |
| 128 | +> - All components you implement should go in the `src/components` directory. |
| 129 | +> - Don't change the component folder names as those are the files being imported into the tests. |
| 130 | +> - **Do not remove the pre-filled code** |
| 131 | +> - Want to quickly review some of the concepts you’ve been learning? Take a look at the Cheat Sheets. |
0 commit comments