mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-21 03:03:25 -05:00
fix posthog tracking new user, use next link in form tabs to improve speed
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import { Disclosure } from "@headlessui/react";
|
||||
import clsx from "clsx";
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { useRouter } from "next/router";
|
||||
import { useMemo } from "react";
|
||||
@@ -42,7 +43,7 @@ export default function LayoutWrapperForm({ children }) {
|
||||
<div className="px-2 sm:px-4 lg:divide-y lg:divide-gray-200 lg:px-8">
|
||||
<nav className="hidden lg:flex lg:space-x-8 lg:py-2" aria-label="Global">
|
||||
{navigation.map((item) => (
|
||||
<a
|
||||
<Link
|
||||
key={item.name}
|
||||
href={item.href}
|
||||
className={clsx(
|
||||
@@ -53,7 +54,7 @@ export default function LayoutWrapperForm({ children }) {
|
||||
)}
|
||||
aria-current={item.current ? "page" : undefined}>
|
||||
{item.name}
|
||||
</a>
|
||||
</Link>
|
||||
))}
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -38,7 +38,7 @@ export default async function handle(req: NextApiRequest, res: NextApiResponse)
|
||||
});
|
||||
if (process.env.NEXT_PUBLIC_EMAIL_VERIFICATION_DISABLED !== "1") await sendVerificationEmail(userData);
|
||||
// tracking
|
||||
capturePosthogEvent(user.id, "user created");
|
||||
capturePosthogEvent(userData.id, "user created");
|
||||
res.json(userData);
|
||||
} catch (e) {
|
||||
if (e.code === "P2002") {
|
||||
|
||||
@@ -3,7 +3,7 @@ services:
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
volumes:
|
||||
- postgres:/var/lib/postgresql/data
|
||||
- formbricks-postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_DB=postgres
|
||||
- POSTGRES_USER=postgres
|
||||
@@ -21,5 +21,5 @@ services:
|
||||
- 1025:1025 # smtp server
|
||||
|
||||
volumes:
|
||||
postgres:
|
||||
formbricks-postgres:
|
||||
driver: local
|
||||
|
||||
Generated
-2
@@ -17,7 +17,6 @@ importers:
|
||||
apps/demo:
|
||||
specifiers:
|
||||
'@formbricks/charts': workspace:*
|
||||
'@formbricks/react': workspace:*
|
||||
'@formbricks/tailwind-config': workspace:*
|
||||
'@formbricks/tsconfig': workspace:*
|
||||
'@formbricks/ui': workspace:*
|
||||
@@ -36,7 +35,6 @@ importers:
|
||||
typescript: ^4.9.3
|
||||
dependencies:
|
||||
'@formbricks/charts': link:../../packages/charts
|
||||
'@formbricks/react': link:../../packages/react
|
||||
'@formbricks/ui': link:../../packages/ui
|
||||
'@heroicons/react': 2.0.13_react@18.2.0
|
||||
'@tailwindcss/forms': 0.5.3_tailwindcss@3.2.4
|
||||
|
||||
Reference in New Issue
Block a user