diff --git a/src/App.tsx b/src/App.tsx index d678ab67..0a5e77a2 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -94,7 +94,7 @@ function App() { isAuthenticated && (await logout({ logoutParams: { - returnTo: window.location.origin + "/collections", + returnTo: window.location.origin + "/", }, })); } else { diff --git a/src/i18n/bo-IN.json b/src/i18n/bo-IN.json index 0d5c787f..cbe2e098 100644 --- a/src/i18n/bo-IN.json +++ b/src/i18n/bo-IN.json @@ -225,6 +225,7 @@ "header.profileMenu.profile": "ངོ་སྤྲོད་སྙིང་བསྡུས།", "header.search_bar.search_for": "འདི་འཚོལ་ཞིབ།", "header.site_language": "དྲ་བའི་སྐད་ཡིག།", + "header.plan": "སྦྱོང་ལམ།", "header.text": "ཡིག་མཛོད།", "header.topic": "ཀུན་གླེང་།", "hebrew": "བོད་ཀྱི་སྐད་ཡིག", diff --git a/src/i18n/en.json b/src/i18n/en.json index f384aa10..0ba61991 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -229,6 +229,7 @@ "header.profileMenu.profile": "Profile", "header.search_bar.search_for": "Search for", "header.site_language": "Site Language", + "header.plan": "Plans", "header.text": "Texts", "header.topic": "Topics", "hebrew": "Hebrew", diff --git a/src/routes/navbar/NavigationBar.test.tsx b/src/routes/navbar/NavigationBar.test.tsx index e970f8cf..617d3093 100644 --- a/src/routes/navbar/NavigationBar.test.tsx +++ b/src/routes/navbar/NavigationBar.test.tsx @@ -75,8 +75,8 @@ describe("NavigationBar Component", () => { }; test("renders navigation links", () => { setup(); + expect(screen.getByText("header.plans")).toBeInTheDocument(); expect(screen.getByText("Texts")).toBeInTheDocument(); - // Note: Community link was removed from navigation, only Texts (Collections) link remains }); test("renders search input", () => { diff --git a/src/routes/navbar/NavigationBar.tsx b/src/routes/navbar/NavigationBar.tsx index af7eb100..0a68ef69 100644 --- a/src/routes/navbar/NavigationBar.tsx +++ b/src/routes/navbar/NavigationBar.tsx @@ -77,6 +77,7 @@ const Navigation = () => { const [searchTerm, setSearchTerm] = useState(""); const [params, setParams] = useSearchParams(); const navItems = [ + { to: "/", label: t("header.plans"), key: "plans" }, { to: "/collections", label: t("header.text"), key: "collections" }, ]; diff --git a/src/routes/user-login/UserLogin.tsx b/src/routes/user-login/UserLogin.tsx index 5e4cbdde..2c1981b3 100644 --- a/src/routes/user-login/UserLogin.tsx +++ b/src/routes/user-login/UserLogin.tsx @@ -51,7 +51,7 @@ const UserLogin = () => { const accessToken = data.auth.access_token; const refreshToken = data.auth.refresh_token; login(accessToken, refreshToken); - navigate("/collections"); + navigate("/"); }, onError: (error: any) => { const errorMsg = @@ -107,7 +107,7 @@ const UserLogin = () => { connection, ...(connection === "google-oauth2" && { prompt: "select_account" }), }, - appState: { returnTo: "/collections" }, + appState: { returnTo: "/" }, }); } catch (error: any) { const message = diff --git a/src/routes/user-registration/UserRegistration.tsx b/src/routes/user-registration/UserRegistration.tsx index 4add9483..f67e74fe 100644 --- a/src/routes/user-registration/UserRegistration.tsx +++ b/src/routes/user-registration/UserRegistration.tsx @@ -53,7 +53,7 @@ const UserRegistration = () => { useEffect(() => { if (isLoggedIn || isAuthenticated) { - navigate("/collections"); + navigate("/"); } }, [isLoggedIn, isAuthenticated, navigate]); @@ -69,7 +69,7 @@ const UserRegistration = () => { onSuccess: (data) => { const { access_token, refresh_token } = data.auth; login(access_token, refresh_token); - navigate("/collections"); + navigate("/"); }, onError: (error: any) => { const message = @@ -147,7 +147,7 @@ const UserRegistration = () => { const handleSocialLogin = async (connection: "google-oauth2" | "apple") => { try { - const redirectPath = "/collections"; + const redirectPath = "/"; const authParams: any = { appState: { returnTo: redirectPath }, authorizationParams: { connection },