Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update thread back button to navigate back in browser history #1140

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions ui/admin/app/routes/_auth.threads.$id.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ArrowLeftIcon } from "lucide-react";
import {
ClientLoaderFunctionArgs,
Link,
MetaFunction,
redirect,
useLoaderData,
useMatch,
useNavigate,
} from "react-router";
import { $path } from "safe-routes";

Expand Down Expand Up @@ -82,6 +82,7 @@ export default function ChatAgent() {

const entity = getEntity();

const navigate = useNavigate();
return (
<div className="h-full flex flex-col overflow-hidden relative">
<Tooltip>
Expand All @@ -92,9 +93,13 @@ export default function ChatAgent() {
asChild
>
<TooltipTrigger>
<Link to="/threads">
<Button
size="icon"
variant="outline"
onClick={() => navigate(-1)}
>
<ArrowLeftIcon className="h-4 w-4" />
</Link>
</Button>
</TooltipTrigger>
</Button>
<TooltipContent>Go Back</TooltipContent>
Expand Down