Skip to content

Commit

Permalink
added history
Browse files Browse the repository at this point in the history
  • Loading branch information
AmolSoans committed Dec 29, 2024
1 parent 1f60f73 commit c92417a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/popup/popup.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// popup/popup.js
import { h, render } from 'preact';
import { Router } from 'preact-router';
import { createHashHistory } from 'history';
import 'preact/devtools'
import PostedTrades from '../../src/components/pages/PostedTrades.js';
import NewTradePage from '../../src/components/pages/newTrade';
Expand All @@ -18,7 +19,8 @@ const App = () => {

<div class="flex flex-col min-w-screen h-screen">
<main class="flex-1 p-1 flex items-center justify-center">
<Router>
<Router
history={createHashHistory()} onError={(err) => console.error("Router Error:", err)}>
<PostedTrades path="/"/>
{/* <PostedTrades path="/posted-trades" /> Added second path */}
<UpdateTrade path="/update-trade/:id" />
Expand Down

0 comments on commit c92417a

Please sign in to comment.