import React from 'react';
import ReactDOM from 'react-dom/client';
import Catalog from './Catalog';
import './index.css';

document.onchange = () => {
  const target = document.querySelector('#threads');
  let currentUrl = window.location.href;
  let BoardID = currentUrl.split('/')[3];
  if (target) {
    ReactDOM.createRoot(target).render(<Catalog boardID={BoardID} />);
  }
};