From 6e6d2c3cbc860d0024e9631b01eeef55b47933a5 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Mon, 12 Feb 2024 20:50:12 +0000
Subject: WIP: Implement saving page functionality in browser extension

---
 packages/browser-extension/src/main.tsx | 33 ++++++++++++++++++++++++++-------
 1 file changed, 26 insertions(+), 7 deletions(-)

(limited to 'packages/browser-extension/src/main.tsx')

diff --git a/packages/browser-extension/src/main.tsx b/packages/browser-extension/src/main.tsx
index 3d7150da..298ab388 100644
--- a/packages/browser-extension/src/main.tsx
+++ b/packages/browser-extension/src/main.tsx
@@ -1,10 +1,29 @@
-import React from 'react'
-import ReactDOM from 'react-dom/client'
-import App from './App.tsx'
-import './index.css'
+import React from "react";
+import ReactDOM from "react-dom/client";
+import App from "./App.tsx";
+import "./index.css";
+import { createBrowserRouter, Navigate, RouterProvider } from "react-router-dom";
+import SettingsPage from "./SettingsPage.tsx";
 
-ReactDOM.createRoot(document.getElementById('root')!).render(
+const router = createBrowserRouter([
+  {
+    path: "/index.html",
+    element: <Navigate to="/" />,
+  },
+  {
+    path: "/",
+    element: <App />,
+  },
+  {
+    path: "/settings",
+    element: <SettingsPage />,
+  },
+]);
+
+ReactDOM.createRoot(document.getElementById("root")!).render(
   <React.StrictMode>
-    <App />
+    <div className="p-4 w-96">
+      <RouterProvider router={router} />
+    </div>
   </React.StrictMode>,
-)
+);
-- 
cgit v1.2.3-70-g09d2

