snort/src/index.js

41 lines
1.2 KiB
JavaScript
Raw Normal View History

2022-12-18 14:51:47 +00:00
import './index.css';
import React from 'react';
import ReactDOM from 'react-dom/client';
import { Provider } from 'react-redux'
import {
BrowserRouter as Router,
Routes,
Route,
} from "react-router-dom";
import { NostrSystem } from './nostr/System';
import EventPage from './pages/EventPage';
import Layout from './pages/Layout';
import LoginPage from './pages/Login';
import ProfilePage from './pages/ProfilePage';
import RootPage from './pages/Root';
import Store from "./state/Store";
2022-12-30 23:35:02 +00:00
import NotificationsPage from './pages/Notifications';
2022-12-18 14:51:47 +00:00
2022-12-30 23:35:02 +00:00
export const System = new NostrSystem();
2022-12-18 14:51:47 +00:00
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
2022-12-30 23:35:02 +00:00
<Provider store={Store}>
<Router>
<Layout>
<Routes>
<Route path="/" exact element={<RootPage />} />
<Route path="/login" exact element={<LoginPage />} />
<Route path="/e/:id" exact element={<EventPage />} />
<Route path="/p/:id" exact element={<ProfilePage />} />
<Route path="/notifications" exact element={<NotificationsPage />} />
</Routes>
</Layout>
</Router>
</Provider>
2022-12-18 14:51:47 +00:00
</React.StrictMode>
);