Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

87
Views
bootstrap modal not popping up and instead displaying before the button

I am trying to create a popup for my react typescript application, so I'm using the react bootstrap modal component. However the modal/popup is being displayed below the button which triggers the popup, instead of displaying the link in a popup. Does anyone know why this is happening?

export default function LinkWrapper(props: {link: string}) {
    const [show, setShow] = React.useState(false)
    const handleClose = () => setShow(false)
    const handleShow = () => setShow(true)
    
    const url = new URL(props.link)
    return (
        <>
            <Button type="button" large onClick={handleShow}>
                Launch Link
            </Button>

            <Modal show={show} onHide={handleClose}>
                <Modal.Title>Link Popup</Modal.Title>
                <Modal.Body><iframe src={props.link} style={{width:'100%',height:'400px'}}/></Modal.Body>
                <Modal.Footer>
                    <Button type="button" large onClick={handleClose}>
                        close
                    </Button>
                </Modal.Footer>
            </Modal>
        </>
    );
};
about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!