mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-19 17:01:41 +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);
|
|
}
|
|
};
|