From cc69667900a06d171812b8560df8ee85c0bb273a Mon Sep 17 00:00:00 2001
From: 01lexandre <01.lexandre@gmail.com>
Date: Fri, 8 Jul 2022 10:35:00 -0300
Subject: [PATCH] removido intercom e add crisp
---
package.json | 1 +
public/sitemap-0.xml | 40 +++++++++++++--
src/Components/Header/DrawerExample.js | 36 ++++++++++++++
src/Components/Header/HeaderNav.js | 51 ++++++++++++++++++++
src/Components/Header/MobileDrawer.js | 42 ++++++++++++++++
src/Components/Header/menu.data.js | 16 ++++++
src/pages/_app.js | 43 +++++------------
src/pages/buscar-pecas/fabricantes/[slug].js | 39 +++++++++++++++
src/pages/buscar-pecas/index.js | 6 +++
src/pages/index.js | 4 +-
yarn.lock | 5 ++
11 files changed, 247 insertions(+), 36 deletions(-)
create mode 100644 src/Components/Header/DrawerExample.js
create mode 100644 src/Components/Header/HeaderNav.js
create mode 100644 src/Components/Header/MobileDrawer.js
create mode 100644 src/Components/Header/menu.data.js
create mode 100644 src/pages/buscar-pecas/fabricantes/[slug].js
create mode 100644 src/pages/buscar-pecas/index.js
diff --git a/package.json b/package.json
index f18bff3..76fc17e 100644
--- a/package.json
+++ b/package.json
@@ -25,6 +25,7 @@
"next-seo": "^5.4.0",
"react": "17.0.2",
"react-dom": "17.0.2",
+ "react-icons": "^4.4.0",
"react-input-mask": "^2.0.4",
"react-lottie": "^1.2.3",
"react-select": "^5.3.2",
diff --git a/public/sitemap-0.xml b/public/sitemap-0.xml
index 28d19e1..9232b6c 100644
--- a/public/sitemap-0.xml
+++ b/public/sitemap-0.xml
@@ -1,7 +1,39 @@
-http://www.naweby.com.br2022-06-09T18:56:22.580Zdaily0.7
-http://www.naweby.com.br/cadastre-se-gratis2022-06-09T18:56:22.580Zdaily0.7
-http://www.naweby.com.br/termos-de-uso2022-06-09T18:56:22.580Zdaily0.7
-http://www.naweby.com.br/tudo-pronto2022-06-09T18:56:22.580Zdaily0.7
+http://www.naweby.com.br2022-07-01T22:31:49.944Zdaily0.7
+http://www.naweby.com.br/buscar-pecas2022-07-01T22:31:49.944Zdaily0.7
+http://www.naweby.com.br/cadastre-se-gratis2022-07-01T22:31:49.944Zdaily0.7
+http://www.naweby.com.br/termos-de-uso2022-07-01T22:31:49.944Zdaily0.7
+http://www.naweby.com.br/tudo-pronto2022-07-01T22:31:49.944Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/12022-07-01T22:31:49.944Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/22022-07-01T22:31:49.944Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/32022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/42022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/52022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/62022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/72022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/82022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/92022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/102022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/112022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/122022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/132022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/142022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/152022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/162022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/172022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/182022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/192022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/202022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/212022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/222022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/232022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/242022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/252022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/262022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/272022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/282022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/292022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/302022-07-01T22:31:49.945Zdaily0.7
+http://www.naweby.com.br/buscar-pecas/fabricantes/312022-07-01T22:31:49.945Zdaily0.7
\ No newline at end of file
diff --git a/src/Components/Header/DrawerExample.js b/src/Components/Header/DrawerExample.js
new file mode 100644
index 0000000..b996d82
--- /dev/null
+++ b/src/Components/Header/DrawerExample.js
@@ -0,0 +1,36 @@
+import React from 'react';
+import { Drawer, DrawerBody, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerContent,
+ DrawerCloseButton, Flex, Text
+} from "@chakra-ui/react";
+export default function DrawerExample({
+ p = 15,
+ placement = "right",
+ width,
+ isOpen,
+ children,
+ onClose,
+ btnRef,
+ title = "Menu",
+ footer,
+ }) {
+ return (
+
+
+
+
+
+
+ {title}
+
+ {children}
+ {footer}
+
+
+
+ );
+}
diff --git a/src/Components/Header/HeaderNav.js b/src/Components/Header/HeaderNav.js
new file mode 100644
index 0000000..165166e
--- /dev/null
+++ b/src/Components/Header/HeaderNav.js
@@ -0,0 +1,51 @@
+import {Image, Flex, Button, HStack, chakra, Box, useColorModeValue} from '@chakra-ui/react';
+import data from './menu.data';
+import React from "react";
+import MobileDrawer from "./MobileDrawer";
+import NextLink from "next/link";
+import logoPrincipal from "../../assets/logo-princ.png";
+import styles from "../../styles/css.module.scss";
+const CTA = "Get Started"
+export default function HeaderNav() {
+ return (
+
+ );
+}
diff --git a/src/Components/Header/MobileDrawer.js b/src/Components/Header/MobileDrawer.js
new file mode 100644
index 0000000..01503a4
--- /dev/null
+++ b/src/Components/Header/MobileDrawer.js
@@ -0,0 +1,42 @@
+import { useDisclosure, Flex, Box, Button, VStack, Icon, HStack, Link as ChakraLink } from "@chakra-ui/react";
+import DrawerExample from './DrawerExample';
+import { IoMdMenu } from 'react-icons/io';
+import data from './menu.data';
+import React from "react";
+import NextLink from "next/link";
+import styles from "../../styles/css.module.scss";
+export default function MobileDrawer() {
+ const { isOpen, onOpen, onClose } = useDisclosure();
+ const btnRef = React.useRef();
+ return (
+
+
+
+
+
+ {data().map((item, i) => (
+
+
+
+ ))}
+
+
+
+
+
+
+
+
+
+ );
+};
diff --git a/src/Components/Header/menu.data.js b/src/Components/Header/menu.data.js
new file mode 100644
index 0000000..e8ed30d
--- /dev/null
+++ b/src/Components/Header/menu.data.js
@@ -0,0 +1,16 @@
+export default function data() {
+ return [
+ {
+ label: 'Home',
+ link: '/'
+ },
+ {
+ label: 'Funcionalidades',
+ link: '#funcionalidades'
+ },
+ {
+ label: 'Blog',
+ link: 'https://blog.naweby.com.br'
+ },
+ ]
+}
diff --git a/src/pages/_app.js b/src/pages/_app.js
index cc70b24..e454d71 100644
--- a/src/pages/_app.js
+++ b/src/pages/_app.js
@@ -13,6 +13,7 @@ const theme = extendTheme(themeShema)
import { DefaultSeo } from 'next-seo';
import SEO from '../../next-seo.config';
import {useRouter} from "next/router";
+import HeaderNav from "../Components/Header/HeaderNav";
// The handler to smoothly scroll the element into view
const handExitComplete = () => {
@@ -56,38 +57,20 @@ function MyApp({ Component, pageProps }) {
}
}}
/>
- {/**/}
- {/*intercom*/}
-
) : (
<>
-
+
>
diff --git a/src/pages/buscar-pecas/fabricantes/[slug].js b/src/pages/buscar-pecas/fabricantes/[slug].js
new file mode 100644
index 0000000..91bb99b
--- /dev/null
+++ b/src/pages/buscar-pecas/fabricantes/[slug].js
@@ -0,0 +1,39 @@
+
+export default function Fabricante({ posts }) {
+ return (
+
+ {typeof posts}
+ {JSON.stringify(posts)}
+
+ )
+}
+
+export async function getStaticProps({ params = {} } = {}) {
+ console.log(params, params?.slug)
+ const res = await fetch('https://62bf404c0bc9b125616a7feb.mockapi.io/v1/fabricantes/'+params?.slug)
+ const posts = await res.json()
+
+ return {
+ props: {
+ posts
+ },
+ revalidate: 10,
+ };
+}
+//
+export async function getStaticPaths() {
+ const res = await fetch('https://62bf404c0bc9b125616a7feb.mockapi.io/v1/fabricantes')
+ const posts = await res.json()
+
+ const paths = posts.filter(({ slug }) => typeof slug === 'string')
+ .map(({ slug }) => ({
+ params: {
+ slug,
+ },
+ }));
+
+ return {
+ paths,
+ fallback: false,
+ };
+}
diff --git a/src/pages/buscar-pecas/index.js b/src/pages/buscar-pecas/index.js
new file mode 100644
index 0000000..fdcce51
--- /dev/null
+++ b/src/pages/buscar-pecas/index.js
@@ -0,0 +1,6 @@
+// https://mockapi.io/projects/62bf404c0bc9b125616a7fec
+export default function BuscarPecas() {
+ return (
+ Buscar Peças
+ )
+}
diff --git a/src/pages/index.js b/src/pages/index.js
index f4a96e1..5910987 100644
--- a/src/pages/index.js
+++ b/src/pages/index.js
@@ -112,7 +112,7 @@ export default function Home() {
name={process.env.APP_NAME}
logo="https://www.example.com/photos/logo.jpg"
/>
-
+
@@ -170,7 +170,7 @@ export default function Home() {
-
+
>
)
}
diff --git a/yarn.lock b/yarn.lock
index ac6bab5..0b1b1a9 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2823,6 +2823,11 @@ react-focus-lock@2.5.2:
use-callback-ref "^1.2.5"
use-sidecar "^1.0.5"
+react-icons@^4.4.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.4.0.tgz#a13a8a20c254854e1ec9aecef28a95cdf24ef703"
+ integrity sha512-fSbvHeVYo/B5/L4VhB7sBA1i2tS8MkT0Hb9t2H1AVPkwGfVHLJCqyr2Py9dKMxsyM63Eng1GkdZfbWj+Fmv8Rg==
+
react-input-mask@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/react-input-mask/-/react-input-mask-2.0.4.tgz#9ade5cf8196f4a856dbf010820fe75a795f3eb14"