Skip to content

Commit

Permalink
update: new chat routing
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinceBaghel258025 committed Sep 20, 2024
1 parent 033c49f commit 58901c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function Home() {
}, [controls, inView]);
const [chatType, setChattype] = useQueryState(
"model",
parseAsString.withDefault("chat")
parseAsString.withDefault("chat"),
);

const { isSignedIn, orgId, orgSlug, userId } = useAuth();
Expand All @@ -80,7 +80,7 @@ export default function Home() {
const data = await res.json();

router.push(
`/dashboard/chat/${data.newChatId}?new=true&clipboard=true&model=${chatType}`
`/dashboard/chat/${data.newChatId}?new=true&clipboard=true&model=${chatType}`,
);
} catch (error) {
console.error("Error creating new chat:", error);
Expand Down
2 changes: 1 addition & 1 deletion src/components/startnewchatbutton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const Startnewchatbutton = (props: Props) => {
});
const data = await res.json();
isLoding(false);
router.push(`/dashboard/${props.org_slug}/chat/${Number(data.newChatId)}`);
router.push(`/dashboard/chat/${Number(data.newChatId)}`);
};

return (
Expand Down

0 comments on commit 58901c3

Please sign in to comment.