Code Monkey home page Code Monkey logo

Comments (4)

zawie avatar zawie commented on September 28, 2024 2

@cdgraham Basically, in src/components/Hero/hero.jsx wrap the return statement in an if statement. If all the values exist (name, title, subtitle, cta) then return what it's already returning, otherwise, return a blank section.

Code snippet of modification:

if (name && title && subtitle && cta) {
    return (
      <section id="hero" className="jumbotron">
        <Container>
          <Fade left={isDesktop} bottom={isMobile} duration={1000} delay={500} distance="30px">
            <h1 className="hero-title">
              {title} <span className="text-color-main">{name}</span>
              <br />
              {subtitle}
            </h1>
          </Fade>
          <Fade left={isDesktop} bottom={isMobile} duration={1000} delay={1000} distance="30px">
            <p className="hero-cta">
              <span className="cta-btn cta-btn--hero">
                <Link to="about" smooth duration={1000}>
                  {cta}
                </Link>
              </span>
            </p>
          </Fade>
        </Container>
      </section>
    );
  }
  return <section id="hero" className="jumbotron" />;

from gatsby-simplefolio.

zawie avatar zawie commented on September 28, 2024

@cobidev I found an easy fix to this. Can you give me access to make a new branch/pull request? So you can review my changes.

from gatsby-simplefolio.

cdgraham avatar cdgraham commented on September 28, 2024

@zawie I saw this issue too but hadn't had a chance to look at it. What is the fix? Cheers

from gatsby-simplefolio.

cdgraham avatar cdgraham commented on September 28, 2024

@zawie Brillant thanks

from gatsby-simplefolio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.