Skip to content

Commit

Permalink
next.js 15 sync-dynamic-apis update
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscao633 committed Nov 26, 2024
1 parent 1c377bc commit dfc13ce
Show file tree
Hide file tree
Showing 18 changed files with 71 additions and 19 deletions.
4 changes: 3 additions & 1 deletion src/app/(main)/console/[[...websiteId]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 3 additions & 1 deletion src/app/(main)/reports/[reportId]/page.tsx
Original file line number Diff line number Diff line change
@@ -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} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/(main)/settings/users/[userId]/page.tsx
Original file line number Diff line number Diff line change
@@ -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} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/(main)/settings/websites/[websiteId]/page.tsx
Original file line number Diff line number Diff line change
@@ -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} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/(main)/settings/websites/page.tsx
Original file line number Diff line number Diff line change
@@ -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} />;
}

Expand Down
10 changes: 9 additions & 1 deletion src/app/(main)/teams/[teamId]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 4 additions & 2 deletions src/app/(main)/teams/[teamId]/settings/members/page.tsx
Original file line number Diff line number Diff line change
@@ -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} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/(main)/teams/[teamId]/settings/team/page.tsx
Original file line number Diff line number Diff line change
@@ -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} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/(main)/teams/[teamId]/settings/websites/page.tsx
Original file line number Diff line number Diff line change
@@ -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} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/(main)/websites/[websiteId]/compare/page.tsx
Original file line number Diff line number Diff line change
@@ -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} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/(main)/websites/[websiteId]/events/page.tsx
Original file line number Diff line number Diff line change
@@ -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} />;
}

Expand Down
10 changes: 9 additions & 1 deletion src/app/(main)/websites/[websiteId]/layout.tsx
Original file line number Diff line number Diff line change
@@ -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>;
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/(main)/websites/[websiteId]/page.tsx
Original file line number Diff line number Diff line change
@@ -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} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/(main)/websites/[websiteId]/realtime/page.tsx
Original file line number Diff line number Diff line change
@@ -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} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/(main)/websites/[websiteId]/reports/page.tsx
Original file line number Diff line number Diff line change
@@ -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} />;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/(main)/websites/[websiteId]/sessions/page.tsx
Original file line number Diff line number Diff line change
@@ -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} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/share/[...shareId]/page.tsx
Original file line number Diff line number Diff line change
@@ -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]} />;
}

0 comments on commit dfc13ce

Please sign in to comment.