export default function ProjectCard1() {
  
  const [open, setOpen] = React.useState(false);
  const handleClick = () => {
    setOpen(true).then(response => {
      window.open("https://project-uts-teori.vercel.app/");
    });
  };
  const handleClose = (event, reason) => {
    if (reason === 'clickaway') {
      return;
    }
    setOpen(false);
  };
   
it says TypeError: Cannot read properties of undefined (reading 'then'). i need to display the alert message first before it window.open to the site.
 
    