fix: convert from use-query-params to nuqs

This commit is contained in:
bracesproul
2025-03-17 13:14:47 -07:00
parent 706cc7cc1a
commit c8bfb1cdc8
9 changed files with 4121 additions and 2024 deletions

View File

@@ -12,7 +12,7 @@ import {
type UIMessage,
type RemoveUIMessage,
} from "@langchain/langgraph-sdk/react-ui";
import { useQueryState } from 'nuqs'
import { useQueryState } from "nuqs";
import { Input } from "@/components/ui/input";
import { Button } from "@/components/ui/button";
import { LangGraphLogoSVG } from "@/components/icons/langgraph";
@@ -133,9 +133,7 @@ export const StreamProvider: React.FC<{ children: ReactNode }> = ({
_setApiKey(key);
};
const [assistantId, setAssistantId] = useQueryState(
"assistantId",
);
const [assistantId, setAssistantId] = useQueryState("assistantId");
if (!apiUrl || !assistantId) {
return (