Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions apps/web/app/(org)/dashboard/caps/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,18 @@ async function getSharedSpacesForVideos(videoIds: Video.VideoId[]) {
return sharedSpacesMap;
}

export default async function CapsPage(props: {
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
}) {
export default async function CapsPage(props: PageProps<"/dashboard/caps">) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify PageProps type is available.

The function signature now uses PageProps<"/dashboard/caps">, but this type is not imported in the file. Confirm that PageProps is either:

  • A global type provided by Next.js
  • Defined in a custom types file that's globally available via tsconfig.json
  • Should be imported explicitly

Run the following script to verify the PageProps type definition:


🏁 Script executed:

#!/bin/bash
# Search for PageProps type definition in the codebase
rg -n --type=ts 'type PageProps' -A 5

# Search for PageProps imports
rg -n --type=ts "import.*PageProps" -C 2

# Check if it's used elsewhere in the codebase
rg -n --type=ts 'PageProps<' -C 2

Length of output: 1773


Import PageProps in CapsPage
Add the missing type import so PageProps<"/dashboard/caps"> is resolved. For example:

import type { PageProps } from 'next/app';

at the top of apps/web/app/(org)/dashboard/caps/page.tsx.

🤖 Prompt for AI Agents
In apps/web/app/(org)/dashboard/caps/page.tsx around line 99, the generic
PageProps<"/dashboard/caps"> is used but PageProps is not imported; add an
import type for PageProps from 'next/app' at the top of the file (e.g., import
type { PageProps } from 'next/app';) so the type resolves.

const searchParams = await props.searchParams;
const user = await getCurrentUser();

if (!user || !user.id) {
redirect("/login");
}

const userId = user.id;
const page = Number(searchParams.page) || 1;
const limit = Number(searchParams.limit) || 15;

const userId = user.id;
const offset = (page - 1) * limit;

const totalCountResult = await db()
Expand Down
2 changes: 0 additions & 2 deletions apps/web/app/(org)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { PropsWithChildren } from "react";
import { Intercom } from "../Layout/Intercom";

export const revalidate = 0;

export default function Layout(props: PropsWithChildren) {
return (
<>
Expand Down
3 changes: 0 additions & 3 deletions apps/web/app/(site)/download/[platform]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { type NextRequest, NextResponse } from "next/server";

export const runtime = "edge";

// Disable caching to ensure users always get the latest download URL
export const revalidate = 0;

export async function GET(
request: NextRequest,
props: { params: Promise<{ platform: string }> },
Expand Down
2 changes: 0 additions & 2 deletions apps/web/app/api/changelog/status/route.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { NextResponse } from "next/server";
import { getChangelogPosts } from "../../../../utils/changelog";

export const revalidate = 0;

export async function GET(request: Request) {
const { searchParams } = new URL(request.url);
const version = searchParams.get("version");
Expand Down
1 change: 0 additions & 1 deletion apps/web/app/api/download/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { type NextRequest, NextResponse } from "next/server";

export const runtime = "edge";
export const revalidate = 0;

export async function GET(request: NextRequest) {
const userAgent = request.headers.get("user-agent") || "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ const octokit = new Octokit();

export const runtime = "edge";

export const revalidate = 0;

export async function GET(
req: Request,
props: RouteContext<"/api/releases/tauri/[version]/[target]/[arch]">,
Expand Down
2 changes: 0 additions & 2 deletions apps/web/app/api/status/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export const revalidate = 0;

export async function GET() {
return new Response("OK", {
status: 200,
Expand Down
2 changes: 0 additions & 2 deletions apps/web/app/api/thumbnail/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import type { NextRequest } from "next/server";
import { runPromise } from "@/lib/server";
import { getHeaders } from "@/utils/helpers";

export const revalidate = 0;

export async function GET(request: NextRequest) {
const { searchParams } = request.nextUrl;
const videoId = searchParams.get("videoId");
Expand Down
4 changes: 0 additions & 4 deletions apps/web/app/embed/[videoId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ import { isAiGenerationEnabled } from "@/utils/flags";
import { EmbedVideo } from "./_components/EmbedVideo";
import { PasswordOverlay } from "./_components/PasswordOverlay";

export const dynamic = "auto";
export const dynamicParams = true;
export const revalidate = 30;

export async function generateMetadata(
props: PageProps<"/embed/[videoId]">,
): Promise<Metadata> {
Expand Down
2 changes: 0 additions & 2 deletions apps/web/app/robots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import type { MetadataRoute } from "next";
import { headers, type UnsafeUnwrappedHeaders } from "next/headers";
import { seoPages } from "@/lib/seo-pages";

export const revalidate = 0;

export default function robots(): MetadataRoute.Robots {
const seoPageSlugs = Object.keys(seoPages);
const headersList = headers() as unknown as UnsafeUnwrappedHeaders;
Expand Down
4 changes: 0 additions & 4 deletions apps/web/app/s/[videoId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ import { PasswordOverlay } from "./_components/PasswordOverlay";
import { ShareHeader } from "./_components/ShareHeader";
import { Share } from "./Share";

export const dynamic = "auto";
export const dynamicParams = true;
export const revalidate = 30;

// Helper function to fetch shared spaces data for a video
async function getSharedSpacesForVideo(videoId: Video.VideoId) {
// Fetch space-level sharing
Expand Down