mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
next.js 15 sync-dynamic-apis update
This commit is contained in:
parent
1c377bcdc3
commit
dfc13ced55
18 changed files with 71 additions and 19 deletions
|
|
@ -5,7 +5,9 @@ async function getEnabled() {
|
||||||
return !!process.env.ENABLE_TEST_CONSOLE;
|
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();
|
const enabled = await getEnabled();
|
||||||
|
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
import ReportPage from './ReportPage';
|
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} />;
|
return <ReportPage reportId={reportId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import UserPage from './UserPage';
|
import UserPage from './UserPage';
|
||||||
import { Metadata } from 'next';
|
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} />;
|
return <UserPage userId={userId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import WebsiteSettingsPage from './WebsiteSettingsPage';
|
import WebsiteSettingsPage from './WebsiteSettingsPage';
|
||||||
import { Metadata } from 'next';
|
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} />;
|
return <WebsiteSettingsPage websiteId={websiteId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
import WebsitesSettingsPage from './WebsitesSettingsPage';
|
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} />;
|
return <WebsitesSettingsPage teamId={teamId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,15 @@ import TeamProvider from './TeamProvider';
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
import TeamSettingsLayout from './settings/TeamSettingsLayout';
|
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 (
|
return (
|
||||||
<TeamProvider teamId={teamId}>
|
<TeamProvider teamId={teamId}>
|
||||||
<TeamSettingsLayout>{children}</TeamSettingsLayout>
|
<TeamSettingsLayout>{children}</TeamSettingsLayout>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import TeamMembersPage from './TeamMembersPage';
|
|
||||||
import { Metadata } from 'next';
|
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} />;
|
return <TeamMembersPage teamId={teamId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
import TeamPage from './TeamPage';
|
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} />;
|
return <TeamPage teamId={teamId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import TeamWebsitesPage from './TeamWebsitesPage';
|
import TeamWebsitesPage from './TeamWebsitesPage';
|
||||||
import { Metadata } from 'next';
|
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} />;
|
return <TeamWebsitesPage teamId={teamId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import WebsiteComparePage from './WebsiteComparePage';
|
import WebsiteComparePage from './WebsiteComparePage';
|
||||||
import { Metadata } from 'next';
|
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} />;
|
return <WebsiteComparePage websiteId={websiteId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
import EventsPage from './EventsPage';
|
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} />;
|
return <EventsPage websiteId={websiteId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,15 @@
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
import WebsiteProvider from './WebsiteProvider';
|
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>;
|
return <WebsiteProvider websiteId={websiteId}>{children}</WebsiteProvider>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import WebsiteDetailsPage from './WebsiteDetailsPage';
|
import WebsiteDetailsPage from './WebsiteDetailsPage';
|
||||||
import { Metadata } from 'next';
|
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} />;
|
return <WebsiteDetailsPage websiteId={websiteId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import WebsiteRealtimePage from './WebsiteRealtimePage';
|
import WebsiteRealtimePage from './WebsiteRealtimePage';
|
||||||
import { Metadata } from 'next';
|
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} />;
|
return <WebsiteRealtimePage websiteId={websiteId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import WebsiteReportsPage from './WebsiteReportsPage';
|
import WebsiteReportsPage from './WebsiteReportsPage';
|
||||||
import { Metadata } from 'next';
|
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} />;
|
return <WebsiteReportsPage websiteId={websiteId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,13 @@
|
||||||
import SessionDetailsPage from './SessionDetailsPage';
|
import SessionDetailsPage from './SessionDetailsPage';
|
||||||
import { Metadata } from 'next';
|
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} />;
|
return <SessionDetailsPage websiteId={websiteId} sessionId={sessionId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import SessionsPage from './SessionsPage';
|
import SessionsPage from './SessionsPage';
|
||||||
import { Metadata } from 'next';
|
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} />;
|
return <SessionsPage websiteId={websiteId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
import SharePage from './SharePage';
|
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]} />;
|
return <SharePage shareId={shareId[0]} />;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue