mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-24 15:42:26 +03:00
2b4c3ecbbc
* feat: add Knowledge tab * feat: use tanstack query for knowledges fetching * feat: update header * feat: remove upload page * feat: make chat page the default redirection page * feat(homePage): redirect user to chat page when already authenticated
12 lines
319 B
TypeScript
12 lines
319 B
TypeScript
import { redirect } from "next/navigation";
|
|
|
|
export const redirectToPreviousPageOrChatPage = (): void => {
|
|
const previousPage = sessionStorage.getItem("previous-page");
|
|
if (previousPage === null) {
|
|
redirect("/chat");
|
|
} else {
|
|
sessionStorage.removeItem("previous-page");
|
|
redirect(previousPage);
|
|
}
|
|
};
|