added RouterLink component setup route system
This commit is contained in:
parent
43163a19b2
commit
fd3ef3fb9c
1
src/components/typography/RouterLink.tsx
Normal file
1
src/components/typography/RouterLink.tsx
Normal file
@ -0,0 +1 @@
|
||||
export { NavLink as RouterLink } from "react-router-dom";
|
@ -1,16 +1,22 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import './index.css';
|
||||
import App from './App';
|
||||
import reportWebVitals from './reportWebVitals';
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import { BrowserRouter, Routes, Route } from "react-router-dom";
|
||||
import "./index.css";
|
||||
import App from "./App";
|
||||
import reportWebVitals from "./reportWebVitals";
|
||||
|
||||
import "./localization/i18n";
|
||||
|
||||
ReactDOM.render(
|
||||
const rootElement = document.getElementById("root");
|
||||
if (!rootElement) throw new Error("Failed to find the root element");
|
||||
const root = ReactDOM.createRoot(rootElement);
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
document.getElementById('root')
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path="/" element={<App />}></Route>
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
</React.StrictMode>
|
||||
);
|
||||
|
||||
// If you want to start measuring performance in your app, pass a function
|
||||
|
Loading…
x
Reference in New Issue
Block a user