import { useEffect, useState } from "react"; import styled from "styled-components"; import Button from "../../../../../Styled/Button"; import { downloadImg } from "./PrintView"; interface Props { window: Window; screenshot: Promise | null; } const ButtonBar = styled.section` display: flex; justify-content: flex-end; `; const PrintViewButtons = (props: Props) => { const [isDisabled, setDisabled] = useState(true); useEffect(() => { props.screenshot?.then(() => setDisabled(false)); }, [props.screenshot]); return ( ); }; export default PrintViewButtons;