mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
next.js 15 sync-dynamic-apis update
This commit is contained in:
parent
1c377bcdc3
commit
dfc13ced55
@ -5,7 +5,9 @@ async function getEnabled() {
|
||||
return !!process.env.ENABLE_TEST_CONSOLE;
|
||||
}
|
||||
|
||||
export default async function ({ params: { websiteId } }) {
|
||||
export default async function ({ params }: { params: { websiteId: string } }) {
|
||||
const { websiteId } = await params;
|
||||
|
||||
const enabled = await getEnabled();
|
||||
|
||||
if (!enabled) {
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { Metadata } from 'next';
|
||||
import ReportPage from './ReportPage';
|
||||
|
||||
export default function ({ params: { reportId } }) {
|
||||
export default async function ({ params }: { params: { reportId: string } }) {
|
||||
const { reportId } = await params;
|
||||
|
||||
return <ReportPage reportId={reportId} />;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import UserPage from './UserPage';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export default function ({ params: { userId } }) {
|
||||
export default async function ({ params }: { params: { userId: string } }) {
|
||||
const { userId } = await params;
|
||||
|
||||
return <UserPage userId={userId} />;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import WebsiteSettingsPage from './WebsiteSettingsPage';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export default async function ({ params: { websiteId } }) {
|
||||
export default async function ({ params }: { params: { websiteId: string } }) {
|
||||
const { websiteId } = await params;
|
||||
|
||||
return <WebsiteSettingsPage websiteId={websiteId} />;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { Metadata } from 'next';
|
||||
import WebsitesSettingsPage from './WebsitesSettingsPage';
|
||||
|
||||
export default function ({ params: { teamId } }: { params: { teamId: string } }) {
|
||||
export default async function ({ params }: { params: { teamId: string } }) {
|
||||
const { teamId } = await params;
|
||||
|
||||
return <WebsitesSettingsPage teamId={teamId} />;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,15 @@ import TeamProvider from './TeamProvider';
|
||||
import { Metadata } from 'next';
|
||||
import TeamSettingsLayout from './settings/TeamSettingsLayout';
|
||||
|
||||
export default function ({ children, params: { teamId } }) {
|
||||
export default async function ({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: any;
|
||||
params: { teamId: string };
|
||||
}) {
|
||||
const { teamId } = await params;
|
||||
|
||||
return (
|
||||
<TeamProvider teamId={teamId}>
|
||||
<TeamSettingsLayout>{children}</TeamSettingsLayout>
|
||||
|
@ -1,7 +1,9 @@
|
||||
import TeamMembersPage from './TeamMembersPage';
|
||||
import { Metadata } from 'next';
|
||||
import TeamMembersPage from './TeamMembersPage';
|
||||
|
||||
export default async function ({ params }: { params: { teamId: string } }) {
|
||||
const { teamId } = await params;
|
||||
|
||||
export default function ({ params: { teamId } }) {
|
||||
return <TeamMembersPage teamId={teamId} />;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { Metadata } from 'next';
|
||||
import TeamPage from './TeamPage';
|
||||
|
||||
export default function ({ params: { teamId } }) {
|
||||
export default async function ({ params }: { params: { teamId: string } }) {
|
||||
const { teamId } = await params;
|
||||
|
||||
return <TeamPage teamId={teamId} />;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import TeamWebsitesPage from './TeamWebsitesPage';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export default function ({ params: { teamId } }) {
|
||||
export default async function ({ params }: { params: { teamId: string } }) {
|
||||
const { teamId } = await params;
|
||||
|
||||
return <TeamWebsitesPage teamId={teamId} />;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import WebsiteComparePage from './WebsiteComparePage';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export default function ({ params: { websiteId } }) {
|
||||
export default async function ({ params }: { params: { websiteId: string } }) {
|
||||
const { websiteId } = await params;
|
||||
|
||||
return <WebsiteComparePage websiteId={websiteId} />;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { Metadata } from 'next';
|
||||
import EventsPage from './EventsPage';
|
||||
|
||||
export default async function ({ params: { websiteId } }) {
|
||||
export default async function ({ params }: { params: { websiteId: string } }) {
|
||||
const { websiteId } = await params;
|
||||
|
||||
return <EventsPage websiteId={websiteId} />;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,15 @@
|
||||
import { Metadata } from 'next';
|
||||
import WebsiteProvider from './WebsiteProvider';
|
||||
|
||||
export default function ({ children, params: { websiteId } }) {
|
||||
export default async function ({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: any;
|
||||
params: { websiteId: string };
|
||||
}) {
|
||||
const { websiteId } = await params;
|
||||
|
||||
return <WebsiteProvider websiteId={websiteId}>{children}</WebsiteProvider>;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import WebsiteDetailsPage from './WebsiteDetailsPage';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export default function WebsitePage({ params: { websiteId } }) {
|
||||
export default async function WebsitePage({ params }: { params: { websiteId: string } }) {
|
||||
const { websiteId } = await params;
|
||||
|
||||
return <WebsiteDetailsPage websiteId={websiteId} />;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import WebsiteRealtimePage from './WebsiteRealtimePage';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export default function ({ params: { websiteId } }) {
|
||||
export default async function ({ params }: { params: { websiteId: string } }) {
|
||||
const { websiteId } = await params;
|
||||
|
||||
return <WebsiteRealtimePage websiteId={websiteId} />;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import WebsiteReportsPage from './WebsiteReportsPage';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export default function ({ params: { websiteId } }) {
|
||||
export default async function ({ params }: { params: { websiteId: string } }) {
|
||||
const { websiteId } = await params;
|
||||
|
||||
return <WebsiteReportsPage websiteId={websiteId} />;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,13 @@
|
||||
import SessionDetailsPage from './SessionDetailsPage';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export default function WebsitePage({ params: { websiteId, sessionId } }) {
|
||||
export default async function WebsitePage({
|
||||
params,
|
||||
}: {
|
||||
params: { websiteId: string; sessionId: string };
|
||||
}) {
|
||||
const { websiteId, sessionId } = await params;
|
||||
|
||||
return <SessionDetailsPage websiteId={websiteId} sessionId={sessionId} />;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import SessionsPage from './SessionsPage';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export default function ({ params: { websiteId } }) {
|
||||
export default async function ({ params }: { params: { websiteId: string } }) {
|
||||
const { websiteId } = await params;
|
||||
|
||||
return <SessionsPage websiteId={websiteId} />;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
import SharePage from './SharePage';
|
||||
|
||||
export default function ({ params: { shareId } }) {
|
||||
export default async function ({ params }: { params: { shareId: string } }) {
|
||||
const { shareId } = await params;
|
||||
|
||||
return <SharePage shareId={shareId[0]} />;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user