From 339d1fd76412f95ab356161a698e407e5e092bc9 Mon Sep 17 00:00:00 2001 From: benjacanas Date: Wed, 23 Mar 2022 09:58:39 -0300 Subject: [PATCH 1/2] locafile en todos los schemas --- src/schema/caseSchema.js | 4 ++++ src/schema/generalSchema.js | 4 ++++ src/schema/globalSeoSchema.js | 4 ++++ src/schema/homeSchema.js | 4 ++++ src/schema/iconSchema.js | 4 ++++ src/schema/landingSchema.js | 4 ++++ src/schema/layoutSchema.js | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/src/schema/caseSchema.js b/src/schema/caseSchema.js index d165fdc5..170c855b 100644 --- a/src/schema/caseSchema.js +++ b/src/schema/caseSchema.js @@ -260,6 +260,10 @@ type StrapiCase implements Node { width: Int height: Int } + + type LocalFile { + localFile: File @link(from: "localFile___NODE") + } ` module.exports = { diff --git a/src/schema/generalSchema.js b/src/schema/generalSchema.js index 107bed9b..d2dd8447 100644 --- a/src/schema/generalSchema.js +++ b/src/schema/generalSchema.js @@ -27,6 +27,10 @@ type LocalFile { ): Date formats: StrapiBlogCategoryArticleAuthorImageFormats } + + type LocalFile { + localFile: File @link(from: "localFile___NODE") + } ` module.exports = { diff --git a/src/schema/globalSeoSchema.js b/src/schema/globalSeoSchema.js index 074c4805..7e0b8328 100644 --- a/src/schema/globalSeoSchema.js +++ b/src/schema/globalSeoSchema.js @@ -70,6 +70,10 @@ type StrapiGlobalConfig implements Node { enable: Boolean src: String } + + type LocalFile { + localFile: File @link(from: "localFile___NODE") + } ` module.exports = { value: globalSeoSchema, diff --git a/src/schema/homeSchema.js b/src/schema/homeSchema.js index 639f9557..d0086883 100644 --- a/src/schema/homeSchema.js +++ b/src/schema/homeSchema.js @@ -35,6 +35,10 @@ type StrapiHome implements Node { pageKeywords: String } + type LocalFile { + localFile: File @link(from: "localFile___NODE") + } + ` module.exports = { value: homeSchema, diff --git a/src/schema/iconSchema.js b/src/schema/iconSchema.js index 8c8f66d1..bcc2b5e1 100644 --- a/src/schema/iconSchema.js +++ b/src/schema/iconSchema.js @@ -61,6 +61,10 @@ type StrapiIcon implements Node { ): Date localFile: File } + + type LocalFile { + localFile: File @link(from: "localFile___NODE") + } ` module.exports = { value: iconScheme, diff --git a/src/schema/landingSchema.js b/src/schema/landingSchema.js index e472e4f3..8c3ee3ed 100644 --- a/src/schema/landingSchema.js +++ b/src/schema/landingSchema.js @@ -35,6 +35,10 @@ type StrapiLandingPage implements Node { pageDescription: String pageKeywords: String } + + type LocalFile { + localFile: File @link(from: "localFile___NODE") + } ` module.exports = { value: landingSchema, diff --git a/src/schema/layoutSchema.js b/src/schema/layoutSchema.js index 9e82bfae..6d9965e0 100644 --- a/src/schema/layoutSchema.js +++ b/src/schema/layoutSchema.js @@ -352,6 +352,10 @@ type StrapiLayoutFooter { navbar: StrapiLayoutNavbar strapiId: Int } + + type LocalFile { + localFile: File @link(from: "localFile___NODE") + } ` module.exports = { value: layoutSchema, From a194abbd0896728c1bae1205d4bb6c1b064d64fa Mon Sep 17 00:00:00 2001 From: benjacanas Date: Wed, 23 Mar 2022 10:48:14 -0300 Subject: [PATCH 2/2] - home nav + jobs --- src/components/Hero/Hero.js | 1 - src/components/JobsPage/JobsPage.js | 66 ++++++++++--------- .../NavBar/AnimatedNavBar/AnimatedNavbar.js | 44 +++++-------- src/components/index.js | 2 + src/components/layout.js | 2 - src/pages/jobs.js | 6 ++ 6 files changed, 59 insertions(+), 62 deletions(-) create mode 100644 src/pages/jobs.js diff --git a/src/components/Hero/Hero.js b/src/components/Hero/Hero.js index 49a4abb8..d1912257 100644 --- a/src/components/Hero/Hero.js +++ b/src/components/Hero/Hero.js @@ -6,7 +6,6 @@ export default function Hero({ data }) { const richList = data.listAnimation; const image = data.image.url; - console.log(richList, "lista") const regexList = /(- )(.*)/g; //Parametros en la funcion y validar el richText q acepte mas q h1 diff --git a/src/components/JobsPage/JobsPage.js b/src/components/JobsPage/JobsPage.js index fd3f3059..cdfa6db9 100644 --- a/src/components/JobsPage/JobsPage.js +++ b/src/components/JobsPage/JobsPage.js @@ -1,37 +1,39 @@ -import React from 'react' -import Layout from '../layout' -import Helmet from 'react-helmet' +import React from "react" +import Layout from "../layout" +import Helmet from "react-helmet" import MarkdownView from "react-showdown" -import { Seo } from '../index' -import './JobsPage.scss' +import { Seo } from "../index" +import "./JobsPage.scss" -export default function JobsPage() { - const jobsData = useJobsPage() - const title = jobsData?.strapiJobsPage?.title - const { pageTitle, pageDescription, pageKeywords } = jobsData?.strapiJobsPage?.pageMetadata || {} +const JobsPage = () => { - return ( - - {jobsData?.strapiJobsPage?.pageMetadata && ( - - )} - -
- - - - - -
- ) + + + + + ) } + +export default JobsPage diff --git a/src/components/NavBar/AnimatedNavBar/AnimatedNavbar.js b/src/components/NavBar/AnimatedNavBar/AnimatedNavbar.js index c19676e4..87345a9c 100644 --- a/src/components/NavBar/AnimatedNavBar/AnimatedNavbar.js +++ b/src/components/NavBar/AnimatedNavBar/AnimatedNavbar.js @@ -31,38 +31,23 @@ const AnimatedNavbar = ({ duration, }) => { const navbarConfig = [ - { - title: "Home", - slug: "", - dropdown: () => ( - component.strapi_component !== "home.transition" - ) - .map(component => ({ - name: getComponentTitle(component), - id: component.strapi_component + "-" + component.id, - }))} - /> - ), - }, ...navbarItems.map(navItem => { if (navItem.landing) { return { title: navItem.label, slug: navItem.landing.slug, - dropdown: () => ( - landing.name === navItem.landing.name) - .body.map(component => ({ - name: getComponentTitle(component), - id: component.strapi_component + "-" + component.id, - slug: navItem.landing.slug, - }))} - /> - ), + dropdown: () => + navItem.dropdown ? ( + landing.name === navItem.landing.name) + .body.map(component => ({ + name: getComponentTitle(component), + id: component.strapi_component + "-" + component.id, + slug: navItem.landing.slug, + }))} + /> + ) : null, } } else if (navItem.url) { return { @@ -72,6 +57,11 @@ const AnimatedNavbar = ({ } } }), + { + title: "Join Us", + slug: "jobs", + dropdown: () => , + }, { title: "Blog", slug: "blog", diff --git a/src/components/index.js b/src/components/index.js index 76591434..750da70d 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -7,7 +7,9 @@ import BannerClientes from "./Banners/BannerClientes" import BannerTop from "./Banners/BannerTop" import BannerActionCall from "./Banners/BannerActionCall" import CasesSection from "./CasesSection/CasesSection" +import JobsPage from "./JobsPage/JobsPage" export { + JobsPage, Cards, CasesSection, Seo, diff --git a/src/components/layout.js b/src/components/layout.js index ca51caa4..a7bbfbc6 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -32,9 +32,7 @@ const Layout = ({ children, options = {}, location }) => { React.useEffect(() => { const hash = location?.state?.component - console.log(hash) let el = hash && document.getElementById(hash) - console.log(el) if (el) { el.scrollIntoView({ behavior: "smooth" }) } diff --git a/src/pages/jobs.js b/src/pages/jobs.js new file mode 100644 index 00000000..54baac6b --- /dev/null +++ b/src/pages/jobs.js @@ -0,0 +1,6 @@ +import React from "react" +import {JobsPage} from "../components" + +const Jobs = () => + +export default Jobs \ No newline at end of file