import React from 'react';
import { useSearchParams } from 'react-router-dom';


export default function PreviewObj(props) {

  const [ searchParams ] = useSearchParams();
  const url = decodeURIComponent(searchParams.get('url'));
  const type = decodeURIComponent(searchParams.get('type'));

  return (
    <object
      data={url}
      type={type}
      width="100%"
      height="100%"
    />
  );
}
