1
0
forked from Kieran/snort
snort/src/index.js
2023-01-01 19:57:27 +00:00

43 lines
1.3 KiB
JavaScript

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";
import NotificationsPage from './pages/Notifications';
import NewUserPage from './pages/NewUserPage';
export const System = new NostrSystem();
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<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 />} />
<Route path="/new" exact element={<NewUserPage />} />
</Routes>
</Layout>
</Router>
</Provider>
</React.StrictMode>
);