Fixed 'use client' usage.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
'use client';
|
||||
import { Button, Icon, Icons, Modal, ModalTrigger, Text, useToasts } from 'react-basics';
|
||||
import WebsiteAddForm from './WebsiteAddForm';
|
||||
import { useMessages } from 'components/hooks';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
'use client';
|
||||
import {
|
||||
Form,
|
||||
FormRow,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
'use client';
|
||||
import { ReactNode } from 'react';
|
||||
import WebsitesTable from 'app/(main)/settings/websites/WebsitesTable';
|
||||
import DataTable from 'components/common/DataTable';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
'use client';
|
||||
import { useMessages } from 'components/hooks';
|
||||
import PageHeader from 'components/layout/PageHeader';
|
||||
import WebsiteAddButton from './WebsiteAddButton';
|
||||
|
||||
@@ -3,12 +3,12 @@ import { useLogin } from 'components/hooks';
|
||||
import WebsitesDataTable from './WebsitesDataTable';
|
||||
import WebsitesHeader from './WebsitesHeader';
|
||||
|
||||
export default function Websites({ teamId }: { teamId: string }) {
|
||||
export default function WebsitesPage({ teamId }: { teamId: string }) {
|
||||
const { user } = useLogin();
|
||||
|
||||
return (
|
||||
<>
|
||||
<WebsitesHeader teamId={teamId} showActions={user.role !== 'view-only'} />
|
||||
<WebsitesHeader teamId={teamId} allowCreate={user.role !== 'view-only'} />
|
||||
<WebsitesDataTable teamId={teamId} userId={user.id} allowEdit={true} />
|
||||
</>
|
||||
);
|
||||
@@ -1,4 +1,3 @@
|
||||
'use client';
|
||||
import { ReactNode } from 'react';
|
||||
import { Text, Icon, Icons, GridTable, GridColumn, useBreakpoint } from 'react-basics';
|
||||
import { useMessages, useTeamUrl } from 'components/hooks';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
'use client';
|
||||
import {
|
||||
Form,
|
||||
FormRow,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
'use client';
|
||||
import { TextArea } from 'react-basics';
|
||||
import { useMessages, useConfig } from 'components/hooks';
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
'use client';
|
||||
import { Button, Modal, ModalTrigger, ActionForm, useToasts } from 'react-basics';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useMessages } from 'components/hooks';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
'use client';
|
||||
import { useApi, useMessages } from 'components/hooks';
|
||||
import TypeConfirmationForm from 'components/common/TypeConfirmationForm';
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
'use client';
|
||||
import { useContext, useRef } from 'react';
|
||||
import {
|
||||
SubmitButton,
|
||||
|
||||
11
src/app/(main)/settings/websites/[websiteId]/WebsitePage.tsx
Normal file
11
src/app/(main)/settings/websites/[websiteId]/WebsitePage.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
'use client';
|
||||
import WebsiteProvider from 'app/(main)/websites/[websiteId]/WebsiteProvider';
|
||||
import WebsiteSettings from './WebsiteSettings';
|
||||
|
||||
export default function WebsitePage({ websiteId }: { websiteId: string }) {
|
||||
return (
|
||||
<WebsiteProvider websiteId={websiteId}>
|
||||
<WebsiteSettings websiteId={websiteId} />
|
||||
</WebsiteProvider>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
'use client';
|
||||
import { useApi, useMessages } from 'components/hooks';
|
||||
import TypeConfirmationForm from 'components/common/TypeConfirmationForm';
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
'use client';
|
||||
import { useState, Key, useContext } from 'react';
|
||||
import { Item, Tabs, Button, Text, Icon } from 'react-basics';
|
||||
import Link from 'next/link';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import WebsiteProvider from 'app/(main)/websites/[websiteId]/WebsiteProvider';
|
||||
import WebsiteSettings from './WebsiteSettings';
|
||||
import WebsitePage from './WebsitePage';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export default async function WebsiteSettingsPage({ params: { websiteId } }) {
|
||||
return (
|
||||
<WebsiteProvider websiteId={websiteId}>
|
||||
<WebsiteSettings websiteId={websiteId} />
|
||||
</WebsiteProvider>
|
||||
);
|
||||
export default async function ({ params: { websiteId } }) {
|
||||
return <WebsitePage websiteId={websiteId} />;
|
||||
}
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Website settings - Umami',
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Metadata } from 'next';
|
||||
import Websites from './Websites';
|
||||
import WebsitesPage from './WebsitesPage';
|
||||
|
||||
export default function ({ params: { teamId } }: { params: { teamId: string } }) {
|
||||
return <Websites teamId={teamId} />;
|
||||
return <WebsitesPage teamId={teamId} />;
|
||||
}
|
||||
|
||||
export const metadata: Metadata = {
|
||||
|
||||
Reference in New Issue
Block a user