From 91e679643fb1cd8ea3f68c1d74f9837c55f2c8bf Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Wed, 7 Feb 2024 10:27:23 -0800 Subject: [PATCH] Fixed TeamsProvider not working. --- src/app/(main)/teams/[teamId]/TeamProvider.tsx | 1 + src/app/(main)/{settings => }/teams/[teamId]/layout.tsx | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/app/(main)/{settings => }/teams/[teamId]/layout.tsx (61%) diff --git a/src/app/(main)/teams/[teamId]/TeamProvider.tsx b/src/app/(main)/teams/[teamId]/TeamProvider.tsx index 1ccdfd64..02a7e1b8 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 dfe95bd3..f18d802a 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 {children};