├── .eslintrc.json ├── .github └── preview.png ├── .gitignore ├── LICENSE ├── README.md ├── next-env.d.ts ├── next.config.js ├── package-lock.json ├── package.json ├── public ├── favicon.png └── images │ ├── car.png │ ├── chevrolet.svg │ ├── close.svg │ ├── logo.svg │ ├── search-mobile.svg │ └── search.svg ├── src ├── data │ └── errorCodes.ts ├── hooks │ └── useMatchMedia.ts ├── pages │ ├── _app.tsx │ ├── _document.tsx │ └── index.tsx └── styles │ ├── global.ts │ ├── index.ts │ └── pages │ └── index.ts ├── tsconfig.json └── yarn.lock /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /.github/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/birobirobiro/my-onix-web/395e56c53128d15f2a9edb6b52d5579154cfb1ca/.github/preview.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env.local 29 | .env.development.local 30 | .env.test.local 31 | .env.production.local 32 | 33 | # vercel 34 | .vercel 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 João Inácio Neto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | my-onix 3 |

4 | 5 |

6 | License 7 | 8 | Forks 9 | 10 | Stars 11 |

12 | 13 |

14 | 15 |

16 | 17 |
18 | 19 | ## 🧪 Technologies 20 | 21 | This project was developed using the following technologies: 22 | 23 | - [NextJS](https://nextjs.org/) 24 | - [Stitches](https://stitches.dev/) 25 | 26 | ## 🚀 Getting started 27 | 28 | Clone the project and access the folder. 29 | 30 | ```bash 31 | git clone https://github.com/birobirobiro/my-onix-web.git 32 | 33 | cd my-onix-web 34 | ``` 35 | 36 | Run this command to install the dependencies. 37 | 38 | ```bash 39 | yarn install 40 | 41 | yarn dev 42 | ``` 43 | 44 | ## 🔖 Layout 45 | 46 | You can view the project through the links below: 47 | 48 | - [Live Preview](https://myonix.vercel.app/) 49 | 50 | - [Figma](https://www.figma.com/file/lbP6LDjR1s9g6NbnYnwNdY/myOnix/duplicate) 51 | 52 | Remembering that you need to have a [Figma](http://figma.com/) account to access it. 53 | 54 | ## 📝 License 55 | 56 | This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. 57 | 58 | --- 59 | 60 | Made with 💜 by [birobirobiro](https://www.birobirobiro.dev) 👋 61 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | reactStrictMode: true, 3 | compress: true 4 | } 5 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-onix-web", 3 | "private": true, 4 | "scripts": { 5 | "dev": "next dev", 6 | "build": "next build", 7 | "start": "next start", 8 | "lint": "next lint" 9 | }, 10 | "dependencies": { 11 | "@stitches/react": "^1.2.6", 12 | "@types/node": "^17.0.18", 13 | "next": "12.0.10", 14 | "react": "17.0.2", 15 | "react-dom": "17.0.2" 16 | }, 17 | "devDependencies": { 18 | "@types/react": "^17.0.39", 19 | "eslint": "8.9.0", 20 | "eslint-config-next": "12.0.10", 21 | "typescript": "^4.5.5" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/birobirobiro/my-onix-web/395e56c53128d15f2a9edb6b52d5579154cfb1ca/public/favicon.png -------------------------------------------------------------------------------- /public/images/car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/birobirobiro/my-onix-web/395e56c53128d15f2a9edb6b52d5579154cfb1ca/public/images/car.png -------------------------------------------------------------------------------- /public/images/chevrolet.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /public/images/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /public/images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/images/search-mobile.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /public/images/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/data/errorCodes.ts: -------------------------------------------------------------------------------- 1 | export const errorCodes = [ 2 | { 3 | id: "1", 4 | error: { 5 | code: "2", 6 | message: `Nenhum controle remoto detectado, pressione a embreagem para reinicializar`, 7 | }, 8 | }, 9 | { 10 | id: "2", 11 | error: { 12 | code: "4", 13 | message: `Ar-condicionado desligado devido à alta temperatura do motor`, 14 | }, 15 | }, 16 | { 17 | id: "3", 18 | error: { 19 | code: "5", 20 | message: `A coluna da direção está travada`, 21 | }, 22 | }, 23 | { 24 | id: "4", 25 | error: { 26 | code: "7", 27 | message: `Gire o volante, desligue a chave e depois ligue novamente`, 28 | }, 29 | }, 30 | { 31 | id: "5", 32 | error: { 33 | code: "9", 34 | message: `Gire o volante, ligue o veículo novamente`, 35 | }, 36 | }, 37 | { 38 | id: "6", 39 | error: { 40 | code: "10", 41 | message: `Freios superaquecidos`, 42 | }, 43 | }, 44 | { 45 | id: "7", 46 | error: { 47 | code: "15", 48 | message: `Falha da luz de freio auxiliar`, 49 | }, 50 | }, 51 | { 52 | id: "8", 53 | error: { 54 | code: "16", 55 | message: `Manutenção de luzes de freio`, 56 | }, 57 | }, 58 | { 59 | id: "9", 60 | error: { 61 | code: "17", 62 | message: `Funcionamento incorreto da função de nivelamento dos faróis`, 63 | }, 64 | }, 65 | { 66 | id: "10", 67 | error: { 68 | code: "18", 69 | message: `Falha no farol baixo esquerdo`, 70 | }, 71 | }, 72 | { 73 | id: "11", 74 | error: { 75 | code: "20", 76 | message: `Falha no farol baixo direito`, 77 | }, 78 | }, 79 | { 80 | id: "12", 81 | error: { 82 | code: "21", 83 | message: `Falha na luz de seta esquerda`, 84 | }, 85 | }, 86 | { 87 | id: "13", 88 | error: { 89 | code: "22", 90 | message: `Falha na luz de seta direita`, 91 | }, 92 | }, 93 | { 94 | id: "14", 95 | error: { 96 | code: "23", 97 | message: `Falha na luz de ré`, 98 | }, 99 | }, 100 | { 101 | id: "15", 102 | error: { 103 | code: "24", 104 | message: `Falha na luz da placa de licença`, 105 | }, 106 | }, 107 | { 108 | id: "16", 109 | error: { 110 | code: "25", 111 | message: `Falha no sinalizador de direção dianteiro esquerdo`, 112 | }, 113 | }, 114 | { 115 | id: "17", 116 | error: { 117 | code: "26", 118 | message: `Falha no sinalizador de direção traseiro esquerdo`, 119 | }, 120 | }, 121 | { 122 | id: "18", 123 | error: { 124 | code: "27", 125 | message: `Falha no sinalizador de direção dianteiro direito`, 126 | }, 127 | }, 128 | { 129 | id: "19", 130 | error: { 131 | code: "28", 132 | message: `Falha no sinalizador de direção traseiro direito`, 133 | }, 134 | }, 135 | { 136 | id: "20", 137 | error: { 138 | code: "35", 139 | message: `Substitua a bateria do controle remoto da chave`, 140 | }, 141 | }, 142 | { 143 | id: "21", 144 | error: { 145 | code: "49", 146 | message: `Aviso de mudança de faixa indisponível`, 147 | }, 148 | }, 149 | { 150 | id: "22", 151 | error: { 152 | code: "52", 153 | message: `Substitua a correia sincronizadora`, 154 | }, 155 | }, 156 | { 157 | id: "23", 158 | error: { 159 | code: "53", 160 | message: `Aperte a tampa do bocal de abastecimento de combustível`, 161 | }, 162 | }, 163 | { 164 | id: "24", 165 | error: { 166 | code: "59", 167 | message: `Abra e depois feche o vidro do motorista`, 168 | }, 169 | }, 170 | { 171 | id: "25", 172 | error: { 173 | code: "60", 174 | message: `Abra e depois feche o vidro do passageiro`, 175 | }, 176 | }, 177 | { 178 | id: "26", 179 | error: { 180 | code: "61", 181 | message: `Abra e depois feche o vidro traseiro esquerdo`, 182 | }, 183 | }, 184 | { 185 | id: "27", 186 | error: { 187 | code: "62", 188 | message: `Abra e depois feche o vidro traseiro direito`, 189 | }, 190 | }, 191 | { 192 | id: "28", 193 | error: { 194 | code: "65", 195 | message: `Tentativa de furto detectado`, 196 | }, 197 | }, 198 | { 199 | id: "29", 200 | error: { 201 | code: "66", 202 | message: `Falha do alarme antifurto`, 203 | }, 204 | }, 205 | { 206 | id: "30", 207 | error: { 208 | code: "67", 209 | message: `Repare a trava da coluna da direção`, 210 | }, 211 | }, 212 | { 213 | id: "31", 214 | error: { 215 | code: "68", 216 | message: `Repare o EPS / direção assistida, dirija com cuidado`, 217 | }, 218 | }, 219 | { 220 | id: "32", 221 | error: { 222 | code: "75", 223 | message: `Verifique o sistema do ar-condicionado`, 224 | }, 225 | }, 226 | { 227 | id: "33", 228 | error: { 229 | code: "77", 230 | message: `Repare a câmera dianteira`, 231 | }, 232 | }, 233 | { 234 | id: "34", 235 | error: { 236 | code: "79", 237 | message: `Verifique o óleo do motor`, 238 | }, 239 | }, 240 | { 241 | id: "35", 242 | error: { 243 | code: "81", 244 | message: `Verifique a transmissão automática`, 245 | }, 246 | }, 247 | { 248 | id: "36", 249 | error: { 250 | code: "82", 251 | message: `Troque o óleo do motor em breve`, 252 | }, 253 | }, 254 | { 255 | id: "37", 256 | error: { 257 | code: "84", 258 | message: `A potência do motor está reduzida`, 259 | }, 260 | }, 261 | { 262 | id: "38", 263 | error: { 264 | code: "89", 265 | message: `Luz indicadora de anomalia/manutenção do veículo em breve`, 266 | }, 267 | }, 268 | { 269 | id: "39", 270 | error: { 271 | code: "90", 272 | message: `Repare a assistência de frenagem`, 273 | }, 274 | }, 275 | { 276 | id: "40", 277 | error: { 278 | code: "91", 279 | message: `Nenhum controle remoto detectado`, 280 | }, 281 | }, 282 | { 283 | id: "41", 284 | error: { 285 | code: "94", 286 | message: `Coloque a alavanca da transmissão na posição “P”`, 287 | }, 288 | }, 289 | { 290 | id: "42", 291 | error: { 292 | code: "95", 293 | message: `Falha do airbag`, 294 | }, 295 | }, 296 | { 297 | id: "43", 298 | error: { 299 | code: "128", 300 | message: `Capô aberto`, 301 | }, 302 | }, 303 | { 304 | id: "44", 305 | error: { 306 | code: "134", 307 | message: `Falha no assistente de estacionamento — limpe o para-choque`, 308 | }, 309 | }, 310 | { 311 | id: "45", 312 | error: { 313 | code: "136", 314 | message: `Reparar o Assistente de estacionamento`, 315 | }, 316 | }, 317 | { 318 | id: "46", 319 | error: { 320 | code: "174", 321 | message: `Bateria fraca`, 322 | }, 323 | }, 324 | { 325 | id: "47", 326 | error: { 327 | code: "258", 328 | message: `Assistente de estacionamento desligado`, 329 | }, 330 | }, 331 | { 332 | id: "48", 333 | error: { 334 | code: "352", 335 | message: `Superaquecimento do motor – desligue o motor`, 336 | }, 337 | }, 338 | { 339 | id: "49", 340 | error: { 341 | code: "353", 342 | message: `Superaquecimento do motor – deixe o motor em marcha lenta`, 343 | }, 344 | }, 345 | { 346 | id: "50", 347 | error: { 348 | code: "358", 349 | message: `Óleo do motor quente, deixe o motor em marcha lenta`, 350 | }, 351 | }, 352 | ]; 353 | -------------------------------------------------------------------------------- /src/hooks/useMatchMedia.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "react"; 2 | 3 | export default function useMatchMedia(contidtion: string): boolean { 4 | const [isMatched, setIsMatched] = useState(false); 5 | 6 | useEffect(() => { 7 | function listener({ matches }: MediaQueryListEvent) { 8 | setIsMatched(matches); 9 | } 10 | 11 | const matchMedia = window.matchMedia(`(${contidtion})`); 12 | 13 | setIsMatched(matchMedia.matches); 14 | 15 | try { 16 | matchMedia.addEventListener("change", listener); 17 | 18 | return () => matchMedia.removeEventListener("change", listener); 19 | } catch (_) { 20 | matchMedia.addListener(listener); 21 | 22 | return () => matchMedia.removeListener(listener); 23 | } 24 | }, []); 25 | 26 | return isMatched; 27 | } 28 | -------------------------------------------------------------------------------- /src/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import { globalStyles } from "../styles/global" 2 | 3 | function MyApp({ Component, pageProps }) { 4 | return ( 5 | <> 6 | 7 | {globalStyles()} 8 | 9 | ) 10 | } 11 | 12 | export default MyApp 13 | -------------------------------------------------------------------------------- /src/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import NextDocument, { Html, Head, Main, NextScript } from "next/document"; 3 | import { getCssText } from "../styles"; 4 | 5 | export default class Document extends NextDocument { 6 | render() { 7 | return ( 8 | 9 | 10 |