Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

155
Visualizações
Why are my React NavBar buttons not working?

I am creating a clone of the Netflix web app. I am currently developing the landing page. I have included my code below. This is one of the few different ways I have attempted structuring this page.

The layout currently is appearing how I want it to look, however the "main-slice__language-button" and the "main-slice__signin-button" at the top of the page are not working – meaning nothing happens when I click the select dropdown, and the Sign In button is not appearing as clickable. Can anyone explain why it does not work this way and any suggestions for better alternatives?

screenshot of landing page

import backgroundImage from '../../images/mooshflix-background.jpeg';
import netflixLogo from '../../images/netflix-logo.png';

import './MainSlice.css';


const MainSlice = () => {

    return (
        <div className='main-slice-container'>
            <img className='background-image' src={backgroundImage} alt='mooshflix background' />
            <div className='header'>
                <img className='main-slice__logo' src={netflixLogo} alt='' />
                <div className='main-slice__header-buttons'>
                    <select className='main-slice__language-button'>
                        <option>English</option>
                        <option>Spanish</option>
                    </select>
                    <button className='main-slice__signin-button'>Sign In</button>
                </div>
            </div>
            <div className='main-slice__text-container'>
                    <h1 className='main-slice__title'>Unlimited movies, TV shows, and more.</h1>
                    <h2 className='main-slice__subtitle'>Watch anywhere. Cancel anytime.</h2>
                    <div className='main-slice__email-form-container'>
                        <h3 className='email-form-title'>Ready to watch? Enter your email to create or restart your membership.</h3>
                        <form>
                            <input placeholder='Email Address' ></input>
                            <button className='main-slice__email-form-button'>Get Started ></button>
                        </form>
                    </div>
                </div>
        </div>
    )
}

export default MainSlice;```
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

because you DID NOT do anything, what event did u call for that button? you have to add some event listeners like onClick to your btn, like below:

const onStart = () => {
  DO STH WHAT YOU WANT
}

<button className='main-slice__email-form-button' onClick={onStart}>
    Get Started
</button>
                        
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda