diff --git a/desafio-5/Router/Router.tsx b/desafio-5/Router/Router.tsx
new file mode 100644
index 0000000..f13abb3
--- /dev/null
+++ b/desafio-5/Router/Router.tsx
@@ -0,0 +1,11 @@
+import { BrowserRouter, Route } from 'react-router-dom';
+import {Home} from '../Institucional';
+
+
+const Routes = () => (
+
+
+
+);
+
+export default Routes;
diff --git a/desafio-5/package-lock.json b/desafio-5/package-lock.json
index 96e5864..644fe4f 100644
--- a/desafio-5/package-lock.json
+++ b/desafio-5/package-lock.json
@@ -21,6 +21,7 @@
"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",
"sass-loader": "^13.2.0",
"styled-components": "^5.3.6",
@@ -3146,6 +3147,14 @@
}
}
},
+ "node_modules/@remix-run/router": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.2.1.tgz",
+ "integrity": "sha512-XiY0IsyHR+DXYS5vBxpoBe/8veTeoRpMHP+vDosLZxL5bnpetzI0igkxkLZS235ldLzyfkxF+2divEwWHP3vMQ==",
+ "engines": {
+ "node": ">=14"
+ }
+ },
"node_modules/@rollup/plugin-babel": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
@@ -15262,6 +15271,36 @@
"node": ">=0.10.0"
}
},
+ "node_modules/react-router": {
+ "version": "6.6.2",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.6.2.tgz",
+ "integrity": "sha512-uJPG55Pek3orClbURDvfljhqFvMgJRo59Pktywkk8hUUkTY2aRfza8Yhl/vZQXs+TNQyr6tu+uqz/fLxPICOGQ==",
+ "dependencies": {
+ "@remix-run/router": "1.2.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "react": ">=16.8"
+ }
+ },
+ "node_modules/react-router-dom": {
+ "version": "6.6.2",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.6.2.tgz",
+ "integrity": "sha512-6SCDXxRQqW5af8ImOqKza7icmQ47/EMbz572uFjzvcArg3lZ+04PxSPp8qGs+p2Y+q+b+S/AjXv8m8dyLndIIA==",
+ "dependencies": {
+ "@remix-run/router": "1.2.1",
+ "react-router": "6.6.2"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "react": ">=16.8",
+ "react-dom": ">=16.8"
+ }
+ },
"node_modules/react-scripts": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz",
@@ -20839,6 +20878,11 @@
"source-map": "^0.7.3"
}
},
+ "@remix-run/router": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.2.1.tgz",
+ "integrity": "sha512-XiY0IsyHR+DXYS5vBxpoBe/8veTeoRpMHP+vDosLZxL5bnpetzI0igkxkLZS235ldLzyfkxF+2divEwWHP3vMQ=="
+ },
"@rollup/plugin-babel": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
@@ -29562,6 +29606,23 @@
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz",
"integrity": "sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A=="
},
+ "react-router": {
+ "version": "6.6.2",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.6.2.tgz",
+ "integrity": "sha512-uJPG55Pek3orClbURDvfljhqFvMgJRo59Pktywkk8hUUkTY2aRfza8Yhl/vZQXs+TNQyr6tu+uqz/fLxPICOGQ==",
+ "requires": {
+ "@remix-run/router": "1.2.1"
+ }
+ },
+ "react-router-dom": {
+ "version": "6.6.2",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.6.2.tgz",
+ "integrity": "sha512-6SCDXxRQqW5af8ImOqKza7icmQ47/EMbz572uFjzvcArg3lZ+04PxSPp8qGs+p2Y+q+b+S/AjXv8m8dyLndIIA==",
+ "requires": {
+ "@remix-run/router": "1.2.1",
+ "react-router": "6.6.2"
+ }
+ },
"react-scripts": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz",
diff --git a/desafio-5/package.json b/desafio-5/package.json
index 1d6383d..60c8bd5 100644
--- a/desafio-5/package.json
+++ b/desafio-5/package.json
@@ -16,6 +16,7 @@
"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",
"sass-loader": "^13.2.0",
"styled-components": "^5.3.6",
diff --git a/desafio-5/src/components/modules/header.module.scss b/desafio-5/src/components/modules/header.module.scss
index af0052a..7cb93bb 100644
--- a/desafio-5/src/components/modules/header.module.scss
+++ b/desafio-5/src/components/modules/header.module.scss
@@ -129,7 +129,7 @@
min-width: 54px;
width: 100%;
white-space: nowrap;
- button{
+ button,a{
width: 100%;
height: 100%;
font-family: 'Roboto',sans-serif;
diff --git a/desafio-5/src/components/modules/home.module.scss b/desafio-5/src/components/modules/home.module.scss
index b78251b..3321b31 100644
--- a/desafio-5/src/components/modules/home.module.scss
+++ b/desafio-5/src/components/modules/home.module.scss
@@ -67,7 +67,6 @@
}
&-main{
- // background: pink;
width: 100%;
display: flex;
gap: 30px;
@@ -78,7 +77,7 @@
flex-direction: column;
width: 40.291%;
min-width: 302px;
- max-height: 286px;
+ height: 286px;
button{
width: 100%;
height: 39px;
@@ -267,7 +266,7 @@
}
&-main{
&-departaments{
- max-height: 465px;
+ height: 466px;
button{
height: 58px;
font-size: 32px;
@@ -344,6 +343,7 @@
min-width: 280px;
border-right: 0;
width: 100%;
+
}
&-section{
min-width: 280px;
diff --git a/desafio-5/src/index.tsx b/desafio-5/src/index.tsx
index ab0deb7..cdeceee 100644
--- a/desafio-5/src/index.tsx
+++ b/desafio-5/src/index.tsx
@@ -1,12 +1,12 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
-import { Home } from './pages/Institucional';
+import Routers from "./pages/router/Pathrooter"
import { Header } from './components/scripts/header';
import { Footer } from './components/scripts/footer';
import {SubmenuProvider} from "./contexts/SubmenuContext"
import './components/Main.scss';
import './components/common/global.scss';
-import './components/common/resets.scss'
+import './components/common/resets.scss';
const rootElement = document.getElementById('root');
const rootheader = document.getElementById('rootheader');
const rootfooter = document.getElementById('rootfooter');
@@ -23,7 +23,7 @@ if (rootheader) {
if (rootElement) {
ReactDOM.createRoot(rootElement).render(
-
+
);
} else {
// rootElement não foi encontrado. Talvez seja necessário aguardar o carregamento da página.
diff --git a/desafio-5/src/pages/Institucional.tsx b/desafio-5/src/pages/Institucional.tsx
index fa0f3d7..582a406 100644
--- a/desafio-5/src/pages/Institucional.tsx
+++ b/desafio-5/src/pages/Institucional.tsx
@@ -1,5 +1,6 @@
import React, { useState } from "react"
import { Formik,Form, FormikHelpers } from 'formik';
+import { BrowserRouter as Path, Routes, Route} from "react-router-dom"
import moment from 'moment';
import Homeicon from "../components/assets/icons/home_icon.svg"
@@ -32,7 +33,7 @@ const initialValues = {
aceito: false
}
-const Home = () =>{
+const Institucional = () => {
const [activeSection, setActiveSection] = useState("Sobre");
const [isChecked, setIsChecked] = useState(false);
@@ -209,4 +210,4 @@ const Home = () =>{
-export { Home }
\ No newline at end of file
+export default Institucional
\ No newline at end of file
diff --git a/desafio-5/src/pages/router/Pathrooter.tsx b/desafio-5/src/pages/router/Pathrooter.tsx
new file mode 100644
index 0000000..6d42bae
--- /dev/null
+++ b/desafio-5/src/pages/router/Pathrooter.tsx
@@ -0,0 +1,27 @@
+import { BrowserRouter as Pathrooter, Routes, Route, Navigate } from "react-router-dom"
+import Institucional from '../Institucional';
+
+const pathroot = {
+ Home: "/",
+ Cursos:"/Cursos",
+ SaibaMais:"/Saiba+&+Mais",
+ Institucional:"/Institucional"
+}
+const Routers = () => {
+ return(
+ // rotas
+
+
+ }/>
+ estou no Cursos}/>
+ estou no Saiba Mais}/>
+ }/>
+ }/>
+
+
+ )
+}
+
+export default Routers
+
+export { pathroot }
\ No newline at end of file
diff --git a/desafio-5/src/schema/FormShecma.tsx b/desafio-5/src/schema/FormShecma.tsx
index 3e6670d..c51a939 100644
--- a/desafio-5/src/schema/FormShecma.tsx
+++ b/desafio-5/src/schema/FormShecma.tsx
@@ -28,7 +28,7 @@ export default Yup.object().shape({
.transform(value => moment(value, "DD/MM/YYYY").format("DD/MM/YYYY")),
phone:Yup.string()
- .matches(/^\(?\d{2}\)?[\s-]?\d{5}-?\d{4}$/, 'Invalid phone number format.')
+ .matches(/^\(?\d{2}\)?[\s-]?\d{5}-?\d{4}$/, '* numero invalido')
.required("* Campo Obrigatório"),
instagram:Yup.string()
diff --git a/desafio-5/tsconfig.json b/desafio-5/tsconfig.json
index a273b0c..0142787 100644
--- a/desafio-5/tsconfig.json
+++ b/desafio-5/tsconfig.json
@@ -1,26 +1,20 @@
{
- "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"
- ]
+ "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", "Router"]
}
diff --git a/desafio-5/yarn.lock b/desafio-5/yarn.lock
index 3a25202..086db0d 100644
--- a/desafio-5/yarn.lock
+++ b/desafio-5/yarn.lock
@@ -1602,6 +1602,11 @@
"schema-utils" "^3.0.0"
"source-map" "^0.7.3"
+"@remix-run/router@1.2.1":
+ "integrity" "sha512-XiY0IsyHR+DXYS5vBxpoBe/8veTeoRpMHP+vDosLZxL5bnpetzI0igkxkLZS235ldLzyfkxF+2divEwWHP3vMQ=="
+ "resolved" "https://registry.npmjs.org/@remix-run/router/-/router-1.2.1.tgz"
+ "version" "1.2.1"
+
"@rollup/plugin-babel@^5.2.0":
"integrity" "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q=="
"resolved" "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz"
@@ -8316,7 +8321,7 @@
"strip-ansi" "^6.0.1"
"text-table" "^0.2.0"
-"react-dom@^18.0.0", "react-dom@^18.2.0", "react-dom@>= 16.8.0":
+"react-dom@^18.0.0", "react-dom@^18.2.0", "react-dom@>= 16.8.0", "react-dom@>=16.8":
"integrity" "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g=="
"resolved" "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz"
"version" "18.2.0"
@@ -8359,6 +8364,21 @@
"resolved" "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz"
"version" "0.11.0"
+"react-router-dom@^6.6.2":
+ "integrity" "sha512-6SCDXxRQqW5af8ImOqKza7icmQ47/EMbz572uFjzvcArg3lZ+04PxSPp8qGs+p2Y+q+b+S/AjXv8m8dyLndIIA=="
+ "resolved" "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.6.2.tgz"
+ "version" "6.6.2"
+ dependencies:
+ "@remix-run/router" "1.2.1"
+ "react-router" "6.6.2"
+
+"react-router@6.6.2":
+ "integrity" "sha512-uJPG55Pek3orClbURDvfljhqFvMgJRo59Pktywkk8hUUkTY2aRfza8Yhl/vZQXs+TNQyr6tu+uqz/fLxPICOGQ=="
+ "resolved" "https://registry.npmjs.org/react-router/-/react-router-6.6.2.tgz"
+ "version" "6.6.2"
+ dependencies:
+ "@remix-run/router" "1.2.1"
+
"react-scripts@5.0.1":
"integrity" "sha512-8VAmEm/ZAwQzJ+GOMLbBsTdDKOpuZh7RPs0UymvBR2vRk4iZWCskjbFnxqjrzoIvlNNRZ3QJFx6/qDSi6zSnaQ=="
"resolved" "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz"
@@ -8414,7 +8434,7 @@
optionalDependencies:
"fsevents" "^2.3.2"
-"react@^18.0.0", "react@^18.2.0", "react@>= 16", "react@>= 16.8.0", "react@>=16.8.0":
+"react@^18.0.0", "react@^18.2.0", "react@>= 16", "react@>= 16.8.0", "react@>=16.8", "react@>=16.8.0":
"integrity" "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ=="
"resolved" "https://registry.npmjs.org/react/-/react-18.2.0.tgz"
"version" "18.2.0"