Skip to content

Commit

Permalink
feat: init feed page
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed May 24, 2024
1 parent f3fafff commit 3974674
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/renderer/src/components/feed-column/item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ export function FeedItem({
{
type: "text",
label: "Open Feed in Browser",
click: () => {
// TODO
},
click: () =>
window.open(
`${import.meta.env.VITE_WEB_URL}/feed/${feed.feedId}`,
),
},
{
type: "text",
Expand Down
10 changes: 10 additions & 0 deletions src/renderer/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ const router = createBrowserRouter([
path: "debug",
lazy: () => import("./pages/debug"),
},
{
path: "/feed/:id",
lazy: () => import("./pages/feed/layout"),
children: [
{
path: "",
lazy: () => import("./pages/feed/index"),
},
],
},
],
},
])
Expand Down
7 changes: 7 additions & 0 deletions src/renderer/src/pages/feed/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { useParams } from "react-router-dom"

export function Component() {
const { id } = useParams()

return <>{id}</>
}
5 changes: 5 additions & 0 deletions src/renderer/src/pages/feed/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Outlet } from "react-router-dom"

export function Component() {
return <Outlet />
}

0 comments on commit 3974674

Please sign in to comment.