Skip to content

Instantly share code, notes, and snippets.

@SafaElmali
Created September 19, 2021 13:26
Show Gist options
  • Save SafaElmali/13cc1afade5af5b01b9835799ae7a3a8 to your computer and use it in GitHub Desktop.
Save SafaElmali/13cc1afade5af5b01b9835799ae7a3a8 to your computer and use it in GitHub Desktop.
import "../styles/productDetail.css";
import { useState } from "react";
import Modal from "./Modal";
const ProductDetail = () => {
const [isOpen, setIsOpen] = useState(false);
const handleOpen = () => {
setIsOpen(true);
};
return (
<div className="product-container">
....
<div className="product-button-container">
<button className="add-to-basket-button" onClick={handleOpenPortal}>
Sepete Ekle
</button>
</div>
</div>
<Modal isOpen={isOpen} setIsOpen={setIsOpen} />
</div>
);
};
export default ProductDetail;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment