diff --git a/frontend/app/(home)/Features.tsx b/frontend/app/(home)/Features.tsx deleted file mode 100644 index a682a19d6..000000000 --- a/frontend/app/(home)/Features.tsx +++ /dev/null @@ -1,76 +0,0 @@ -"use client"; -import { ReactNode } from "react"; -import { useTranslation } from "react-i18next"; -import { - GiArtificialIntelligence, - GiBrain, - GiDatabase, - GiFastArrow, - GiLockedDoor, - GiOpenBook, -} from "react-icons/gi"; - -import Card from "@/lib/components/ui/Card"; - -const Features = (): JSX.Element => { - const { t } = useTranslation(); - - return ( -
-
-

{t("features")}

- {/*

Change the way you take notes

*/} -
-
- } - title={t("two_brains_title")} - desc={t("two_brains_desc")} - /> - } - title={t("any_kind_of_data_title")} - desc={t("any_kind_of_data_desc")} - /> - } - title={t("fast_and_accurate_title")} - desc={t("fast_and_accurate_desc")} - /> - } - title={t("fast_and_efficient_title")} - desc={t("fast_and_efficient_desc")} - /> - } - title={t("secure_title")} - desc={t("secure_desc")} - /> - } - title={t("open_source_title")} - desc={t("open_source_desc")} - /> -
-
- ); -}; - -interface FeatureProps { - icon?: ReactNode; - title: string; - desc: string; -} - -const Feature = ({ title, desc, icon }: FeatureProps): JSX.Element => { - return ( - - {icon} -

{title}

-

{desc}

-
- ); -}; - -export default Features; diff --git a/frontend/app/(home)/Hero.tsx b/frontend/app/(home)/Hero.tsx deleted file mode 100644 index 5652cce8c..000000000 --- a/frontend/app/(home)/Hero.tsx +++ /dev/null @@ -1,72 +0,0 @@ -"use client"; -import { motion, useScroll, useSpring, useTransform } from "framer-motion"; -import Link from "next/link"; -import { useRef } from "react"; -import { useTranslation } from "react-i18next"; -import { MdNorthEast } from "react-icons/md"; - -import Button from "@/lib/components/ui/Button"; - -const Hero = (): JSX.Element => { - const { t } = useTranslation(); - - const targetRef = useRef(null); - const { scrollYProgress } = useScroll({ - target: targetRef, - offset: ["start start", "end start"], - }); - - const scaleSync = useTransform(scrollYProgress, [0, 0.5], [1, 0.9]); - const scale = useSpring(scaleSync, { mass: 0.1, stiffness: 100 }); - - const position = useTransform(scrollYProgress, (pos) => { - if (pos === 1) { - return "relative"; - } - - return "sticky"; - }); - - const videoScaleSync = useTransform(scrollYProgress, [0, 0.5], [0.9, 1]); - const videoScale = useSpring(videoScaleSync, { mass: 0.1, stiffness: 100 }); - - const opacitySync = useTransform(scrollYProgress, [0, 0.5], [1, 0]); - const opacity = useSpring(opacitySync, { mass: 0.1, stiffness: 200 }); - - return ( -
- -

- {t("title.short")} Quivr -

-

- {t("description")} -

- - - - - - -
- -
- ); -}; - -export default Hero; diff --git a/frontend/app/(home)/__tests__/Home.test.tsx b/frontend/app/(home)/__tests__/Home.test.tsx index f8d2cc4ec..893379a5f 100644 --- a/frontend/app/(home)/__tests__/Home.test.tsx +++ b/frontend/app/(home)/__tests__/Home.test.tsx @@ -1,9 +1,11 @@ +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { render, screen } from "@testing-library/react"; import { describe, expect, it, vi } from "vitest"; import { getProcessEnvManager } from "@/lib/helpers/getProcessEnvManager"; import HomePage from "../page"; +const queryClient = new QueryClient(); const mockUseSupabase = vi.fn(() => ({ session: { @@ -17,6 +19,9 @@ vi.mock("@/lib/context/SupabaseProvider", () => ({ vi.mock("next/navigation", () => ({ redirect: (url: string) => url, + useRouter: () => ({ + push: (url: string) => url, + }), })); describe("HomePage", () => { @@ -27,7 +32,11 @@ describe("HomePage", () => { NEXT_PUBLIC_ENV: "not-local", }); - render(); + render( + + + + ); const homePage = screen.getByTestId("home-page"); expect(homePage).toBeDefined(); diff --git a/frontend/app/(home)/page.tsx b/frontend/app/(home)/page.tsx index 6837ee989..83d723ed7 100644 --- a/frontend/app/(home)/page.tsx +++ b/frontend/app/(home)/page.tsx @@ -1,12 +1,9 @@ "use client"; -import { useFeatureIsOn } from "@growthbook/growthbook-react"; import { useEffect } from "react"; import { useSupabase } from "@/lib/context/SupabaseProvider"; import { redirectToPreviousPageOrChatPage } from "@/lib/helpers/redirectToPreviousPageOrChatPage"; -import Features from "./Features"; -import Hero from "./Hero"; import { DemoSection, FooterSection, @@ -28,61 +25,49 @@ const HomePage = (): JSX.Element => { } }, [session?.user]); - const isNewHomePage = useFeatureIsOn("new-homepage-activated"); + return ( + <> + + - if (isNewHomePage) { - return ( - <> - - +
+ + + -
- - - + + + - - - + + +
+ - - -
- + + + - - - + + + - - - - - - - -
- - ); - } else { - return ( -
- - + + +
- ); - } + + ); }; export default HomePage; diff --git a/frontend/app/contact/page.tsx b/frontend/app/contact/page.tsx index c4bb1c7a7..7808c0317 100644 --- a/frontend/app/contact/page.tsx +++ b/frontend/app/contact/page.tsx @@ -1,6 +1,4 @@ "use client"; -import { useFeatureIsOn } from "@growthbook/growthbook-react"; -import { redirect } from "next/navigation"; import { useTranslation } from "react-i18next"; import Card from "@/lib/components/ui/Card"; @@ -14,11 +12,7 @@ import { } from "../(home)/components"; const ContactSalesPage = (): JSX.Element => { - const isNewHomePage = useFeatureIsOn("new-homepage-activated"); const { t } = useTranslation("contact"); - if (!isNewHomePage) { - redirect("/"); - } return (
diff --git a/frontend/lib/components/Footer/index.tsx b/frontend/lib/components/Footer/index.tsx index 2a030c473..735aa0ec9 100644 --- a/frontend/lib/components/Footer/index.tsx +++ b/frontend/lib/components/Footer/index.tsx @@ -1,5 +1,4 @@ "use client"; -import { useFeatureIsOn } from "@growthbook/growthbook-react"; import { usePathname } from "next/navigation"; import { DISCORD_URL, GITHUB_URL, TWITTER_URL } from "@/lib/config/CONSTANTS"; @@ -9,11 +8,10 @@ const Footer = (): JSX.Element => { const { session } = useSupabase(); const path = usePathname(); - const isNewHomePageActivated = useFeatureIsOn("new-homepage-activated"); - const isNewHomePage = path === "/" && isNewHomePageActivated; + const isHomePage = path === "/"; const isContactPage = path === "/contact"; - if (session?.user !== undefined || isNewHomePage || isContactPage) { + if (session?.user !== undefined || isHomePage || isContactPage) { return <>; } diff --git a/frontend/lib/components/NavBar/index.tsx b/frontend/lib/components/NavBar/index.tsx index f489be14d..797470ead 100644 --- a/frontend/lib/components/NavBar/index.tsx +++ b/frontend/lib/components/NavBar/index.tsx @@ -1,6 +1,5 @@ "use client"; -import { useFeatureIsOn } from "@growthbook/growthbook-react"; import { usePathname } from "next/navigation"; import { Header } from "./components/Header"; @@ -15,11 +14,10 @@ export const NavBar = (): JSX.Element => { path.startsWith("/chat") || path.startsWith("/brains-management"); - const isNewHomePageActivated = useFeatureIsOn("new-homepage-activated"); - const isNewHomePage = path === "/" && isNewHomePageActivated; + const isHomePage = path === "/"; const isContactPage = path === "/contact"; - if (pageHasSidebar || isNewHomePage || isContactPage) { + if (pageHasSidebar || isHomePage || isContactPage) { return <>; } diff --git a/frontend/public/locales/en/translation.json b/frontend/public/locales/en/translation.json index 1ee1921f1..069466a63 100644 --- a/frontend/public/locales/en/translation.json +++ b/frontend/public/locales/en/translation.json @@ -1,22 +1,7 @@ { "lang": "en-US", "title": "Quivr - Get a Second Brain with Generative AI", - "title.short": "Get a Second Brain with", "description": "Quivr is your second brain in the cloud, designed to easily store and retrieve unstructured information.", - "getStarted": "Get Started", - "features": "Features", - "two_brains_title": "Two brains are better than one", - "two_brains_desc": "Quivr is your second brain in the cloud, designed to easily store and retrieve unstructured information.", - "any_kind_of_data_title": "Store any kind of data", - "any_kind_of_data_desc": "Quivr can handle almost any type of data you throw at it. Text, images, code snippets, we've got you covered.", - "fast_and_accurate_title": "Get a Fast and Consistent Brain", - "fast_and_accurate_desc": "Quivr is your second brain in the cloud, designed to easily store and retrieve unstructured information.", - "fast_and_efficient_title": "Fast and Efficient", - "fast_and_efficient_desc": "Designed with speed and efficiency at its core. Quivr ensures rapid access to your data.", - "secure_title": "Secure", - "secure_desc": "Your data, your control. Always.", - "open_source_title": "Open source", - "open_source_desc": "Freedom is beautiful, so is Quivr. Open source and free to use.", "toastDismiss": "dismiss", "email": "Email", "password": "Password", diff --git a/frontend/public/locales/es/translation.json b/frontend/public/locales/es/translation.json index f323e6c43..569b0dfb0 100644 --- a/frontend/public/locales/es/translation.json +++ b/frontend/public/locales/es/translation.json @@ -1,6 +1,4 @@ { - "any_kind_of_data_desc": "Quivr puede gestionar casi cualquier tipo de dato que le brindes. Texto, imagen, fragmentos de código, te tenemos cubierto.", - "any_kind_of_data_title": "Almacena cualquier tipo de dato", "Chat": "Conversar", "chatButton": "Conversar", "comingSoon": "Próximamente", @@ -12,33 +10,20 @@ "Editor": "Editor", "email": "Correo electrónico", "Explore": "Explorar", - "fast_and_accurate_desc": "Quivr es tu segundo cerebro en la nube, diseñado para almacenar y obtener información inestructurada.", - "fast_and_accurate_title": "Obtén un Cerebro rápido y consistente", - "fast_and_efficient_desc": "Diseñado con velocidad y eficiciencia como base. Quivr asegura rápido acceso a tus datos.", - "fast_and_efficient_title": "Rápido y eficiente", - "features": "Características", - "getStarted": "Empezar a usar", "lang": "es-ES", "loading": "Cargando...", "loginButton": "Iniciar sesión", "logoutButton": "Cerrar sesión", "newChatButton": "Nueva conversación", - "open_source_desc": "La libertad es hermosa, al igual que Quivr. Código abierto y de uso gratuito.", - "open_source_title": "Open source", "or": "o", "and": "y", "Owner": "Propietario", "password": "Contraseña", "resetButton": "Restaurar", - "secure_desc": "Tú controlas tus datos. Siempre.", - "secure_title": "Seguro", "shareButton": "Compartir", "signUpButton": "Registrarse", "title": "Quivr - Tu segundo cerebro con IA generativa", - "title.short": "Obtén un Segundo Cerebro con", "toastDismiss": "cerrar", - "two_brains_desc": "Quivr es tu segundo cerebro en la nube, diseñado para almacenar y obtener información inestructurada.", - "two_brains_title": "Dos cerebros son mejores que uno", "updateButton": "Actualizar", "Upload": "Subir", "uploadButton": "Subir", diff --git a/frontend/public/locales/fr/translation.json b/frontend/public/locales/fr/translation.json index f630bd525..d525e3f15 100644 --- a/frontend/public/locales/fr/translation.json +++ b/frontend/public/locales/fr/translation.json @@ -1,22 +1,7 @@ { "lang": "fr-FR", "title": "Quivr - Obtenez un deuxième cerveau avec l'IA générative", - "title.short": "Obtenez un deuxième cerveau avec", "description": "Quivr est votre deuxième cerveau dans le nuage, conçu pour stocker et récupérer facilement des informations non structurées.", - "getStarted": "Commencer", - "features": "Fonctionnalités", - "two_brains_title": "Deux cerveaux valent mieux qu'un", - "two_brains_desc": "Quivr est votre deuxième cerveau dans le nuage, conçu pour stocker et récupérer facilement des informations non structurées.", - "any_kind_of_data_title": "Stockez n'importe quel type de données", - "any_kind_of_data_desc": "Quivr peut gérer presque n'importe quel type de données que vous lui donnez. Texte, images, extraits de code, nous avons ce qu'il vous faut.", - "fast_and_accurate_title": "Obtenez un cerveau rapide et cohérent", - "fast_and_accurate_desc": "Quivr est votre deuxième cerveau dans le nuage, conçu pour stocker et récupérer facilement des informations non structurées.", - "fast_and_efficient_title": "Rapide et efficace", - "fast_and_efficient_desc": "Conçu avec la rapidité et l'efficacité à son cœur. Quivr assure un accès rapide à vos données.", - "secure_title": "Sécurisé", - "secure_desc": "Vos données, votre contrôle. Toujours.", - "open_source_title": "Open source", - "open_source_desc": "La liberté est belle, tout comme Quivr. Open source et gratuit à utiliser.", "toastDismiss": "ignorer", "email": "Email", "password": "Mot de passe", diff --git a/frontend/public/locales/pt-br/translation.json b/frontend/public/locales/pt-br/translation.json index c7b30aaa6..c56e0609b 100644 --- a/frontend/public/locales/pt-br/translation.json +++ b/frontend/public/locales/pt-br/translation.json @@ -1,22 +1,7 @@ { "lang": "pt-BR", "title": "Quivr - Tenha um Segundo Cérebro com IA Generativa", - "title.short": "Tenha um Segundo Cérebro com", "description": "Quivr é o seu segundo cérebro na nuvem, projetado para armazenar e recuperar facilmente informações não estruturadas.", - "getStarted": "Começar", - "features": "Recursos", - "two_brains_title": "Dois cérebros são melhores que um", - "two_brains_desc": "Quivr é o seu segundo cérebro na nuvem, projetado para armazenar e recuperar facilmente informações não estruturadas.", - "any_kind_of_data_title": "Armazene qualquer tipo de dado", - "any_kind_of_data_desc": "Quivr pode lidar com quase qualquer tipo de dado que você jogar nele. Texto, imagens, trechos de código, estamos aqui para ajudar.", - "fast_and_accurate_title": "Tenha um Cérebro Rápido e Consistente", - "fast_and_accurate_desc": "Quivr é o seu segundo cérebro na nuvem, projetado para armazenar e recuperar facilmente informações não estruturadas.", - "fast_and_efficient_title": "Rápido e Eficiente", - "fast_and_efficient_desc": "Projetado com velocidade e eficiência em seu núcleo. Quivr garante acesso rápido aos seus dados.", - "secure_title": "Seguro", - "secure_desc": "Seus dados, seu controle. Sempre.", - "open_source_title": "Código aberto", - "open_source_desc": "A liberdade é bela, assim como o Quivr. Código aberto e gratuito para usar.", "toastDismiss": "fechar", "email": "Email", "password": "Senha", diff --git a/frontend/public/locales/ru/translation.json b/frontend/public/locales/ru/translation.json index c6c037b3b..113713a99 100644 --- a/frontend/public/locales/ru/translation.json +++ b/frontend/public/locales/ru/translation.json @@ -1,22 +1,7 @@ { "lang": "ru-RU", "title": "Quivr - Второй мозг с генеративным ИИ", - "title.short": "Второй мозг с", "description": "Quivr - это ваш второй мозг в облаке, предназначенный для легкого хранения и извлечения неструктурированной информации.", - "getStarted": "Начать", - "features": "Особенности", - "two_brains_title": "Два мозга лучше одного", - "two_brains_desc": "Quivr - это ваш второй мозг в облаке, предназначенный для легкого хранения и извлечения неструктурированной информации.", - "any_kind_of_data_title": "Храните любые данные", - "any_kind_of_data_desc": "Quivr может обрабатывать практически любой тип данных, с которым вы работаете. Текст, изображения, фрагменты кода - мы позаботились о вас.", - "fast_and_accurate_title": "Получите быстрый и последовательный мозг", - "fast_and_accurate_desc": "Quivr - это ваш второй мозг в облаке, предназначенный для легкого хранения и извлечения неструктурированной информации.", - "fast_and_efficient_title": "Быстро и эффективно", - "fast_and_efficient_desc": "Создан для скорости и эффективности. Quivr обеспечивает быстрый доступ к вашим данным.", - "secure_title": "Безопасность", - "secure_desc": "Ваши данные - ваши контроль. Всегда.", - "open_source_title": "Открытый исходный код", - "open_source_desc": "Свобода красива, так же как и Quivr. Открытый и бесплатный для использования.", "toastDismiss": "закрыть", "email": "Email", "password": "Пароль", diff --git a/frontend/public/locales/zh-cn/translation.json b/frontend/public/locales/zh-cn/translation.json index 77db19054..8a1effb0e 100644 --- a/frontend/public/locales/zh-cn/translation.json +++ b/frontend/public/locales/zh-cn/translation.json @@ -1,22 +1,7 @@ { "lang": "zh-CN", "title": "Quivr - 通过人工智能获得第二个大脑", - "title.short": "获得第二个大脑", "description": "Quivr 是您在云中的第二个大脑,让您轻松存储和检索非结构化信息。", - "getStarted": "开始使用", - "features": "功能", - "two_brains_title": "两个脑袋总比一个好", - "two_brains_desc": "Quivr 是您在云中的第二个大脑,让您轻松存储和检索非结构化信息。", - "any_kind_of_data_title": "存储任何类型的数据", - "any_kind_of_data_desc": "Quivr几乎可以处理任何类型的数据。文本、图像、代码片段,我们会帮你处理的。", - "fast_and_accurate_title": "获得一个快速而稳定的大脑", - "fast_and_accurate_desc": "Quivr 是您在云中的第二个大脑,让您轻松存储和检索非结构化信息。", - "fast_and_efficient_title": "快速高效", - "fast_and_efficient_desc": "以速度和效率为核心设计。Quivr确保快速访问您的数据。", - "secure_title": "安全", - "secure_desc": "您的数据,由您掌控。始终如此。", - "open_source_title": "开源", - "open_source_desc": "自由是美好的,Quivr 也是如此。开放源代码,免费使用。", "toastDismiss": "dismiss", "email": "Email", "password": "密码",