import React, {Suspense} from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import reportWebVitals from './reportWebVitals'; import {createBrowserRouter, RouterProvider, Route, Link} from "react-router-dom"; import {SnackbarProvider} from 'notistack'; const Home2 = React.lazy(() => import('./Home2')); const App2 = React.lazy(() => import('./App2')); const AI = React.lazy(() => import('./AI')); const Signin = React.lazy(() => import('./Signin')); const notFoundStyle = { display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100vh', flexDirection: 'column', backgroundColor: '#f4f4f9', color: '#333', fontFamily: 'Arial, sans-serif', textAlign: 'center', }; const headingStyle = { fontSize: '4rem', fontWeight: 'bold', margin: '0', }; const subheadingStyle = { fontSize: '1.5rem', marginTop: '20px', }; const emojiStyle = { fontSize: '5rem', marginBottom: '20px', }; function ErrorBoundary() { return (
🚫

小造同学遇到了一点麻烦

请刷新页面重试,我们会积极尝试优化体验

) } const router = createBrowserRouter([ {path: "/editor/qingdan/:id", element: (}>), errorElement : () }, {path: "/editor/index.html", element: (}>) }, {path: "/editor/ai", element: (}>) }, {path: "/editor/signin", element: (}>) }, ]); const root = ReactDOM.render(, document.getElementById('root')); // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals reportWebVitals();