diff --git a/app/(loggedIn)/settings/layout.tsx b/app/(loggedIn)/settings/layout.tsx new file mode 100644 index 00000000..a14e64fc --- /dev/null +++ b/app/(loggedIn)/settings/layout.tsx @@ -0,0 +1,16 @@ +export const metadata = { + title: 'Next.js', + description: 'Generated by Next.js', +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + {children} + + ) +} diff --git a/app/api/analytics/vsmarketplace/update/route.ts b/app/api/analytics/vsmarketplace/update/route.ts index 3794acc2..7ea25656 100644 --- a/app/api/analytics/vsmarketplace/update/route.ts +++ b/app/api/analytics/vsmarketplace/update/route.ts @@ -2,6 +2,7 @@ import { NextResponse } from "next/server"; import validateParams from "../../../../../utils/api/validateParams"; import Airtable from "airtable"; import { missingParamsResponse } from "../../../../../utils/api/responses"; +import { missingParamsPosthogTracking } from "../../../../../utils/api/posthogTracking"; Airtable.configure({ endpointUrl: "https://api.airtable.com", apiKey: process.env.AIRTABLE_API_KEY, diff --git a/app/api/extension/getContext/route.ts b/app/api/extension/getContext/route.ts index 0508d3c0..5c6db26b 100644 --- a/app/api/extension/getContext/route.ts +++ b/app/api/extension/getContext/route.ts @@ -6,7 +6,6 @@ import { } from "../../../../utils/api/responses"; import getOpenAISummary from "../../../../utils/actions/getOpenAISummary"; import { StandardProcessedDataArray } from "../../../../types/watermelon"; -import getAsana from "../../../../utils/actions/getAsana"; import getAllServices from "../../../../utils/actions/getAllServices"; function replaceSpecialChars(inputString) { diff --git a/app/api/user/settings/route.ts b/app/api/user/settings/route.ts index c9fb511a..caabad3d 100644 --- a/app/api/user/settings/route.ts +++ b/app/api/user/settings/route.ts @@ -5,6 +5,11 @@ import { missingParamsResponse, successResponse, } from "../../../../utils/api/responses"; +import { + failedPosthogTracking, + missingParamsPosthogTracking, + successPosthogTracking, +} from "../../../../utils/api/posthogTracking"; export async function POST(request: Request) { const req = await request.json(); diff --git a/components/redirect.tsx b/components/redirect.tsx index 1a9eb236..d7ddbfe0 100644 --- a/components/redirect.tsx +++ b/components/redirect.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from "react"; export default function TimeToRedirect({ url }) { - const [timeToRedirect, setTimeToRedirect] = useState(10); + const [timeToRedirect, setTimeToRedirect] = useState(9); useEffect(() => { const interval = setInterval(() => { diff --git a/tests/api/user/settings.test.ts b/tests/api/user/settings.test.ts index e88ddb31..cac2f82c 100644 --- a/tests/api/user/settings.test.ts +++ b/tests/api/user/settings.test.ts @@ -38,16 +38,14 @@ describe("User Route POST function", () => { expect(response.status).toEqual(200); const responseJson = await response.json(); expect(responseJson).toEqual({ - data: { - userSettings: { - AISummary: true, - JiraTickets: 5, - SlackMessages: 5, - GitHubPRs: 5, - NotionPages: 5, - LinearTickets: 5, - ConfluenceDocs: 5, - }, + userSettings: { + AISummary: true, + JiraTickets: 5, + SlackMessages: 5, + GitHubPRs: 5, + NotionPages: 5, + LinearTickets: 5, + ConfluenceDocs: 5, }, }); }); diff --git a/utils/posthog/posthog.ts b/utils/posthog/posthog.ts index 1af29558..87a764f5 100644 --- a/utils/posthog/posthog.ts +++ b/utils/posthog/posthog.ts @@ -19,6 +19,7 @@ function PostHogClient(apiKey: string) { properties, groups, }); + console.log("posthog event", event, properties); if (process.env.NODE_ENV === "development") { console.log( `PostHog event: ${event} with properties: ${JSON.stringify(