Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fixed TeamsProvider not working.

Mike Cao91e679643fb1
diff --git a/src/app/(main)/teams/[teamId]/TeamProvider.tsx b/src/app/(main)/teams/[teamId]/TeamProvider.tsx
index 1ccdfd64b..02a7e1b86 100644
--- a/src/app/(main)/teams/[teamId]/TeamProvider.tsx
+++ b/src/app/(main)/teams/[teamId]/TeamProvider.tsx
@@ -1,3 +1,4 @@
+'use client';
import { createContext, ReactNode, useEffect } from 'react';
import { useTeam } from 'components/hooks';
import { Loading } from 'react-basics';
diff --git a/src/app/(main)/settings/teams/[teamId]/layout.tsx b/src/app/(main)/teams/[teamId]/layout.tsx
similarity index 61%
rename from src/app/(main)/settings/teams/[teamId]/layout.tsx
rename to src/app/(main)/teams/[teamId]/layout.tsx
index dfe95bd39..f18d802af 100644
--- a/src/app/(main)/settings/teams/[teamId]/layout.tsx
+++ b/src/app/(main)/teams/[teamId]/layout.tsx
@@ -1,5 +1,4 @@
-'use client';
-import TeamProvider from 'app/(main)/teams/[teamId]/TeamProvider';
+import TeamProvider from './TeamProvider';
export default function ({ children, params: { teamId } }) {
return <TeamProvider teamId={teamId}>{children}</TeamProvider>;