mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 00:27:11 +01:00
Refactor: removed default exports.
This commit is contained in:
parent
cd944e14ce
commit
f83a12d6cd
343 changed files with 555 additions and 1046 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { useMessages, useModified } from '@/components/hooks';
|
||||
import { Button, Icon, Icons, Modal, ModalTrigger, Text, useToasts } from 'react-basics';
|
||||
import WebsiteAddForm from './WebsiteAddForm';
|
||||
import { WebsiteAddForm } from './WebsiteAddForm';
|
||||
|
||||
export function WebsiteAddButton({ teamId, onSave }: { teamId: string; onSave?: () => void }) {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
|
|
@ -29,5 +29,3 @@ export function WebsiteAddButton({ teamId, onSave }: { teamId: string; onSave?:
|
|||
</ModalTrigger>
|
||||
);
|
||||
}
|
||||
|
||||
export default WebsiteAddButton;
|
||||
|
|
|
|||
|
|
@ -71,5 +71,3 @@ export function WebsiteAddForm({
|
|||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
export default WebsiteAddForm;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { ReactNode } from 'react';
|
||||
import WebsitesTable from '@/app/(main)/settings/websites/WebsitesTable';
|
||||
import DataTable from '@/components/common/DataTable';
|
||||
import { WebsitesTable } from '@/app/(main)/settings/websites/WebsitesTable';
|
||||
import { DataTable } from '@/components/common/DataTable';
|
||||
import { useWebsites } from '@/components/hooks';
|
||||
|
||||
export function WebsitesDataTable({
|
||||
|
|
@ -32,5 +32,3 @@ export function WebsitesDataTable({
|
|||
</DataTable>
|
||||
);
|
||||
}
|
||||
|
||||
export default WebsitesDataTable;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useMessages } from '@/components/hooks';
|
||||
import PageHeader from '@/components/layout/PageHeader';
|
||||
import WebsiteAddButton from './WebsiteAddButton';
|
||||
import { PageHeader } from '@/components/layout/PageHeader';
|
||||
import { WebsiteAddButton } from './WebsiteAddButton';
|
||||
|
||||
export interface WebsitesHeaderProps {
|
||||
teamId?: string;
|
||||
|
|
@ -16,5 +16,3 @@ export function WebsitesHeader({ teamId, allowCreate = true }: WebsitesHeaderPro
|
|||
</PageHeader>
|
||||
);
|
||||
}
|
||||
|
||||
export default WebsitesHeader;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
'use client';
|
||||
import { useLogin } from '@/components/hooks';
|
||||
import WebsitesDataTable from './WebsitesDataTable';
|
||||
import WebsitesHeader from './WebsitesHeader';
|
||||
import { WebsitesDataTable } from './WebsitesDataTable';
|
||||
import { WebsitesHeader } from './WebsitesHeader';
|
||||
import { ROLES } from '@/lib/constants';
|
||||
|
||||
export default function WebsitesSettingsPage({ teamId }: { teamId: string }) {
|
||||
export function WebsitesSettingsPage({ teamId }: { teamId: string }) {
|
||||
const { user } = useLogin();
|
||||
const canCreate = user.role !== ROLES.viewOnly;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { ReactNode } from 'react';
|
||||
import { Text, Icon, Icons, GridTable, GridColumn } from 'react-basics';
|
||||
import { useMessages, useTeamUrl } from '@/components/hooks';
|
||||
import LinkButton from '@/components/common/LinkButton';
|
||||
import { LinkButton } from '@/components/common/LinkButton';
|
||||
|
||||
export interface WebsitesTableProps {
|
||||
data: any[];
|
||||
|
|
@ -61,5 +61,3 @@ export function WebsitesTable({
|
|||
</GridTable>
|
||||
);
|
||||
}
|
||||
|
||||
export default WebsitesTable;
|
||||
|
|
|
|||
|
|
@ -90,5 +90,3 @@ export function ShareUrl({ hostUrl, onSave }: { hostUrl?: string; onSave?: () =>
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default ShareUrl;
|
||||
|
|
|
|||
|
|
@ -25,5 +25,3 @@ export function TrackingCode({ websiteId, hostUrl }: { websiteId: string; hostUr
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default TrackingCode;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { Button, Modal, ModalTrigger, ActionForm } from 'react-basics';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useLogin, useMessages, useModified, useTeams, useTeamUrl } from '@/components/hooks';
|
||||
import WebsiteDeleteForm from './WebsiteDeleteForm';
|
||||
import WebsiteResetForm from './WebsiteResetForm';
|
||||
import WebsiteTransferForm from './WebsiteTransferForm';
|
||||
import { WebsiteDeleteForm } from './WebsiteDeleteForm';
|
||||
import { WebsiteResetForm } from './WebsiteResetForm';
|
||||
import { WebsiteTransferForm } from './WebsiteTransferForm';
|
||||
import { ROLES } from '@/lib/constants';
|
||||
|
||||
export function WebsiteData({ websiteId, onSave }: { websiteId: string; onSave?: () => void }) {
|
||||
|
|
@ -86,5 +86,3 @@ export function WebsiteData({ websiteId, onSave }: { websiteId: string; onSave?:
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default WebsiteData;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { useApi, useMessages } from '@/components/hooks';
|
||||
import TypeConfirmationForm from '@/components/common/TypeConfirmationForm';
|
||||
import { TypeConfirmationForm } from '@/components/common/TypeConfirmationForm';
|
||||
|
||||
const CONFIRM_VALUE = 'DELETE';
|
||||
|
||||
|
|
@ -39,5 +39,3 @@ export function WebsiteDeleteForm({
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default WebsiteDeleteForm;
|
||||
|
|
|
|||
|
|
@ -61,5 +61,3 @@ export function WebsiteEditForm({ websiteId, onSave }: { websiteId: string; onSa
|
|||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
export default WebsiteEditForm;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { useApi, useMessages } from '@/components/hooks';
|
||||
import TypeConfirmationForm from '@/components/common/TypeConfirmationForm';
|
||||
import { TypeConfirmationForm } from '@/components/common/TypeConfirmationForm';
|
||||
|
||||
const CONFIRM_VALUE = 'RESET';
|
||||
|
||||
|
|
@ -38,5 +38,3 @@ export function WebsiteResetForm({
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default WebsiteResetForm;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
import { WebsiteContext } from '@/app/(main)/websites/[websiteId]/WebsiteProvider';
|
||||
import Breadcrumb from '@/components/common/Breadcrumb';
|
||||
import { Breadcrumb } from '@/components/common/Breadcrumb';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import Icons from '@/components/icons';
|
||||
import PageHeader from '@/components/layout/PageHeader';
|
||||
import { Icons } from '@/components/icons';
|
||||
import { PageHeader } from '@/components/layout/PageHeader';
|
||||
import Link from 'next/link';
|
||||
import { Key, useContext, useState } from 'react';
|
||||
import { Button, Icon, Item, Tabs, Text, useToasts } from 'react-basics';
|
||||
import ShareUrl from './ShareUrl';
|
||||
import TrackingCode from './TrackingCode';
|
||||
import WebsiteData from './WebsiteData';
|
||||
import WebsiteEditForm from './WebsiteEditForm';
|
||||
import { ShareUrl } from './ShareUrl';
|
||||
import { TrackingCode } from './TrackingCode';
|
||||
import { WebsiteData } from './WebsiteData';
|
||||
import { WebsiteEditForm } from './WebsiteEditForm';
|
||||
|
||||
export function WebsiteSettings({
|
||||
websiteId,
|
||||
|
|
@ -66,5 +66,3 @@ export function WebsiteSettings({
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default WebsiteSettings;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
'use client';
|
||||
import WebsiteProvider from '@/app/(main)/websites/[websiteId]/WebsiteProvider';
|
||||
import WebsiteSettings from './WebsiteSettings';
|
||||
import { WebsiteProvider } from '@/app/(main)/websites/[websiteId]/WebsiteProvider';
|
||||
import { WebsiteSettings } from './WebsiteSettings';
|
||||
|
||||
export default function WebsiteSettingsPage({ websiteId }: { websiteId: string }) {
|
||||
export function WebsiteSettingsPage({ websiteId }: { websiteId: string }) {
|
||||
return (
|
||||
<WebsiteProvider websiteId={websiteId}>
|
||||
<WebsiteSettings websiteId={websiteId} />
|
||||
|
|
|
|||
|
|
@ -96,5 +96,3 @@ export function WebsiteTransferForm({
|
|||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
export default WebsiteTransferForm;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import WebsiteSettingsPage from './WebsiteSettingsPage';
|
||||
import { WebsiteSettingsPage } from './WebsiteSettingsPage';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export default async function ({ params }: { params: { websiteId: string } }) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Metadata } from 'next';
|
||||
import WebsitesSettingsPage from './WebsitesSettingsPage';
|
||||
import { WebsitesSettingsPage } from './WebsitesSettingsPage';
|
||||
|
||||
export default async function ({ params }: { params: { teamId: string } }) {
|
||||
const { teamId } = await params;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue