import React from 'react';
import EyeIcon from '../icons/EyeIcon';

interface PdfButtonProps {
  dataPdf: string
}

const PdfButton = (props: PdfButtonProps) => {
  const handleClick = (event:any) => {
    event?.preventDefault()
    window.open(encodeURI(props.dataPdf)); 
  };

  return (
    <>
        <button
        onClick={handleClick}>
            <EyeIcon />
          Ver ficha de assinatura
        </button>
      </>
  );
};

export default PdfButton;

import React from 'react';
import EyeIcon from '../icons/EyeIcon';

interface PdfButtonProps {
  dataPdf: string
}

const PdfButton = (props: PdfButtonProps) => {
  const handleClick = (event:any) => {
    event?.preventDefault()
    window.open(encodeURI(`data:application/pdf;filename=generated.pdf;base64,${props.dataPdf}`)); 
  };

  return (
    <>
        <button
        onClick={handleClick}>
            <EyeIcon />
          Ver ficha de assinatura
        </button>
      </>
  );
};

export default PdfButton;

Add header when open plip pdf
chore(webpage): Add header when open plip pdf
