import React from "react"; import { createRoot } from "react-dom/client"; import { App } from "./App.jsx"; import AttachmentPdfPreview from "./AttachmentPdfPreview.jsx"; import "./styles.css"; class AppErrorBoundary extends React.Component { state = { failed: false }; static getDerivedStateFromError() { return { failed: true }; } componentDidCatch(error) { console.error("[app] Prikaz aplikacije nije uspeo.", error); } render() { if (this.state.failed) { return ( Prikaz aplikacije nije uspeo Osvežite stranicu. Ako se problem ponovi, obratite se administratoru. window.location.reload()}>Osveži stranicu ); } return this.props.children; } } createRoot(document.getElementById("root")).render( {window.location.pathname === "/attachment-preview" ? : } , );
Osvežite stranicu. Ako se problem ponovi, obratite se administratoru.