diff --git a/apps/docs/app/global/access-roles/page.mdx b/apps/docs/app/global/access-roles/page.mdx
index edacf86469..268770519d 100644
--- a/apps/docs/app/global/access-roles/page.mdx
+++ b/apps/docs/app/global/access-roles/page.mdx
@@ -87,11 +87,11 @@ There are two ways to invite organization members: One by one or in bulk.
className="max-w-full rounded-lg sm:max-w-3xl"
/>
-2. Click on the `Add Member` button:
+2. Click on the `Add member` button:
@@ -123,11 +123,11 @@ Formbricks sends an email to the organization member with an invitation link. Th
className="max-w-full rounded-lg sm:max-w-3xl"
/>
-2. Click on the `Add Member` button:
+2. Click on the `Add member` button:
diff --git a/apps/docs/components/Navigation.tsx b/apps/docs/components/Navigation.tsx
index 2d17f8402a..e31bb5183e 100644
--- a/apps/docs/components/Navigation.tsx
+++ b/apps/docs/components/Navigation.tsx
@@ -7,7 +7,7 @@ import { AnimatePresence, motion, useIsPresent } from "framer-motion";
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
import Link from "next/link";
import { usePathname } from "next/navigation";
-import { useRef, useState } from "react";
+import { useEffect, useRef, useState } from "react";
import { Button } from "./Button";
import { useIsInsideMobileNavigation } from "./MobileNavigation";
import { useSectionStore } from "./SectionProvider";
@@ -158,7 +158,11 @@ const NavigationGroup = ({
}) => {
const isInsideMobileNavigation = useIsInsideMobileNavigation();
const pathname = usePathname();
- const isActiveGroup = activeGroup?.title === group.title;
+ const [isActiveGroup, setIsActiveGroup] = useState(false);
+
+ useEffect(() => {
+ setIsActiveGroup(activeGroup?.title === group.title);
+ }, [activeGroup?.title, group.title]);
const toggleParentTitle = (title: string) => {
if (openGroups.includes(title)) {
@@ -171,6 +175,13 @@ const NavigationGroup = ({
const isParentOpen = (title: string) => openGroups.includes(title);
+ const sortedLinks = group.links.map((link) => {
+ if (link.children) {
+ link.children.sort((a, b) => a.title.localeCompare(b.title));
+ }
+ return link;
+ });
+
return (
@@ -185,8 +196,12 @@ const NavigationGroup = ({
{isActiveGroup && }
- {group.links.map((link) => (
-
+ {sortedLinks.map((link) => (
+ setIsActiveGroup(true)}>
{link.href ? (
{
await page.locator('[data-testid="members-loading-card"]:first-child').waitFor({ state: "hidden" });
// Add member button
- await expect(page.getByRole("button", { name: "Add Member" })).toBeVisible();
- await page.getByRole("button", { name: "Add Member" }).click();
+ await expect(page.getByRole("button", { name: "Add member" })).toBeVisible();
+ await page.getByRole("button", { name: "Add member" }).click();
// Fill the member name and email form
await expect(page.getByLabel("Email")).toBeVisible();