Removed TeamProvider from components.

This commit is contained in:
Mike Cao 2024-02-06 20:01:38 -08:00
parent ec8176e2c2
commit 194472b104
4 changed files with 11 additions and 12 deletions

View File

@ -0,0 +1,6 @@
'use client';
import TeamProvider from 'app/(main)/teams/[teamId]/TeamProvider';
export default function ({ children, params: { teamId } }) {
return <TeamProvider teamId={teamId}>{children}</TeamProvider>;
}

View File

@ -1,5 +1,4 @@
'use client'; 'use client';
import TeamProvider from 'app/(main)/teams/[teamId]/TeamProvider';
import TeamMembersDataTable from './TeamMembersDataTable'; import TeamMembersDataTable from './TeamMembersDataTable';
import PageHeader from 'components/layout/PageHeader'; import PageHeader from 'components/layout/PageHeader';
import { useMessages } from 'components/hooks'; import { useMessages } from 'components/hooks';
@ -8,10 +7,10 @@ export function TeamMembersPage({ teamId }: { teamId: string }) {
const { formatMessage, labels } = useMessages(); const { formatMessage, labels } = useMessages();
return ( return (
<TeamProvider teamId={teamId}> <>
<PageHeader title={formatMessage(labels.members)} /> <PageHeader title={formatMessage(labels.members)} />
<TeamMembersDataTable teamId={teamId} allowEdit={true} /> <TeamMembersDataTable teamId={teamId} allowEdit={true} />
</TeamProvider> </>
); );
} }

View File

@ -1,13 +1,8 @@
'use client'; 'use client';
import TeamProvider from 'app/(main)/teams/[teamId]/TeamProvider';
import TeamDetails from './TeamDetails'; import TeamDetails from './TeamDetails';
export function TeamPage({ teamId }: { teamId: string }) { export function TeamPage({ teamId }: { teamId: string }) {
return ( return <TeamDetails teamId={teamId} />;
<TeamProvider teamId={teamId}>
<TeamDetails teamId={teamId} />
</TeamProvider>
);
} }
export default TeamPage; export default TeamPage;

View File

@ -1,5 +1,4 @@
'use client'; 'use client';
import TeamProvider from 'app/(main)/teams/[teamId]/TeamProvider';
import TeamWebsitesDataTable from './TeamWebsitesDataTable'; import TeamWebsitesDataTable from './TeamWebsitesDataTable';
import PageHeader from 'components/layout/PageHeader'; import PageHeader from 'components/layout/PageHeader';
import { useMessages } from 'components/hooks'; import { useMessages } from 'components/hooks';
@ -8,10 +7,10 @@ export function TeamWebsitesPage({ teamId }: { teamId: string }) {
const { formatMessage, labels } = useMessages(); const { formatMessage, labels } = useMessages();
return ( return (
<TeamProvider teamId={teamId}> <>
<PageHeader title={formatMessage(labels.websites)} /> <PageHeader title={formatMessage(labels.websites)} />
<TeamWebsitesDataTable teamId={teamId} allowEdit={true} /> <TeamWebsitesDataTable teamId={teamId} allowEdit={true} />
</TeamProvider> </>
); );
} }