Fixed teams settings.
This commit is contained in:
1 parent
9104332623
commit
b0c9197f2d
21 files changed
+40
-2
No files matched your search
@@ -167,6 +167,10 @@ const config = {
|
||||
source: '/telemetry.js',
|
||||
destination: '/api/scripts/telemetry',
|
||||
},
|
||||
{
|
||||
source: '/teams/:teamId/settings/:path*',
|
||||
destination: '/teams/:teamId/settings/:path*',
|
||||
},
|
||||
{
|
||||
source: '/teams/:teamId/:path*',
|
||||
destination: '/:path*',
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
import TeamProvider from './TeamProvider';
|
||||
import { Metadata } from 'next';
|
||||
import TeamSettingsLayout from './settings/TeamSettingsLayout';
|
||||
|
||||
export default function ({ children, params: { teamId } }) {
|
||||
return <TeamProvider teamId={teamId}>{children}</TeamProvider>;
|
||||
return (
|
||||
<TeamProvider teamId={teamId}>
|
||||
<TeamSettingsLayout>{children}</TeamSettingsLayout>
|
||||
</TeamProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export const metadata: Metadata = {
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
'use client';
|
||||
import { ReactNode } from 'react';
|
||||
import { useMessages, useTeamUrl } from 'components/hooks';
|
||||
import MenuLayout from 'components/layout/MenuLayout';
|
||||
|
||||
export default function TeamSettingsLayout({ children }: { children: ReactNode }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { teamId } = useTeamUrl();
|
||||
|
||||
const items = [
|
||||
{
|
||||
key: 'team',
|
||||
label: formatMessage(labels.team),
|
||||
url: `/teams/${teamId}/settings/team`,
|
||||
},
|
||||
{
|
||||
key: 'websites',
|
||||
label: formatMessage(labels.websites),
|
||||
url: `/teams/${teamId}/settings/websites`,
|
||||
},
|
||||
{
|
||||
key: 'members',
|
||||
label: formatMessage(labels.members),
|
||||
url: `/teams/${teamId}/settings/members`,
|
||||
},
|
||||
].filter(n => n);
|
||||
|
||||
return <MenuLayout items={items}>{children}</MenuLayout>;
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -5,7 +5,7 @@ import PageHeader from 'components/layout/PageHeader';
|
||||
import { ROLES } from 'lib/constants';
|
||||
import { useContext, useState } from 'react';
|
||||
import { Flexbox, Item, Tabs } from 'react-basics';
|
||||
import TeamLeaveButton from '../../TeamLeaveButton';
|
||||
import TeamLeaveButton from 'app/(main)/settings/teams/TeamLeaveButton';
|
||||
import TeamManage from './TeamManage';
|
||||
import TeamEditForm from './TeamEditForm';
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user