mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-17 11:21:35 +03:00
9f10ed373c
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
51 lines
1.5 KiB
TypeScript
51 lines
1.5 KiB
TypeScript
"use client";
|
|
import { usePathname } from "next/navigation";
|
|
import { useEffect } from "react";
|
|
|
|
import { QuivrLogo } from "@/lib/assets/QuivrLogo";
|
|
import { SearchBar } from "@/lib/components/ui/SearchBar/SearchBar";
|
|
import { useSupabase } from "@/lib/context/SupabaseProvider";
|
|
import { redirectToLogin } from "@/lib/router/redirectToLogin";
|
|
|
|
import styles from "./page.module.scss";
|
|
|
|
const Search = (): JSX.Element => {
|
|
const pathname = usePathname();
|
|
const { session } = useSupabase();
|
|
|
|
useEffect(() => {
|
|
if (session === null) {
|
|
redirectToLogin();
|
|
}
|
|
}, [pathname, session]);
|
|
|
|
return (
|
|
<div className={styles.search_page_container}>
|
|
<div className={styles.main_container}>
|
|
<div className={styles.quivr_logo_wrapper}>
|
|
<QuivrLogo size={80} color="black" />
|
|
<div className={styles.quivr_text}>
|
|
<span>Talk to </span>
|
|
<span className={styles.quivr_text_primary}>Quivr</span>
|
|
</div>
|
|
</div>
|
|
<div className={styles.search_bar_wrapper}>
|
|
<SearchBar />
|
|
</div>
|
|
</div>
|
|
<div className={styles.shortcuts_card_wrapper}>
|
|
<div className={styles.shortcut_wrapper}>
|
|
<span className={styles.shortcut}>@</span>
|
|
<span>Select a brain</span>
|
|
</div>
|
|
<div className={styles.shortcut_wrapper}>
|
|
<span className={styles.shortcut}>#</span>
|
|
<span>Select a prompt</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Search;
|