first commit
This commit is contained in:
6
ui/app/workspace/prompt-repo/layout.tsx
Normal file
6
ui/app/workspace/prompt-repo/layout.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
import PromptsPage from "./page";
|
||||
|
||||
export const Route = createFileRoute("/workspace/prompt-repo")({
|
||||
component: PromptsPage,
|
||||
});
|
||||
10
ui/app/workspace/prompt-repo/page.tsx
Normal file
10
ui/app/workspace/prompt-repo/page.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import { PromptProvider } from "@/components/prompts/context";
|
||||
import PromptsView from "@/components/prompts/promptsView";
|
||||
|
||||
export default function PromptRepoPage() {
|
||||
return (
|
||||
<PromptProvider>
|
||||
<PromptsView />
|
||||
</PromptProvider>
|
||||
);
|
||||
}
|
||||
6
ui/app/workspace/prompt-repo/prompts/layout.tsx
Normal file
6
ui/app/workspace/prompt-repo/prompts/layout.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
import PromptsPage from "./page";
|
||||
|
||||
export const Route = createFileRoute("/workspace/prompt-repo/prompts")({
|
||||
component: PromptsPage,
|
||||
});
|
||||
13
ui/app/workspace/prompt-repo/prompts/page.tsx
Normal file
13
ui/app/workspace/prompt-repo/prompts/page.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { useLocation, useNavigate } from "@tanstack/react-router";
|
||||
import { useEffect } from "react";
|
||||
|
||||
export default function PromptsPage() {
|
||||
const navigate = useNavigate();
|
||||
const { searchStr } = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
navigate({ to: `/workspace/prompt-repo${searchStr}`, replace: true });
|
||||
}, [navigate, searchStr]);
|
||||
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user