13 lines
381 B
TypeScript
13 lines
381 B
TypeScript
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} />);
|
|
}
|
|
}; |