fix: react suspense

This commit is contained in:
shinya
2025-06-19 23:40:17 +08:00
parent 8e4781f44c
commit 73541b668a
5 changed files with 61 additions and 18 deletions

View File

@@ -3,6 +3,7 @@
'use client';
import { useSearchParams } from 'next/navigation';
import { Suspense } from 'react';
import { useEffect, useRef, useState } from 'react';
import React from 'react';
@@ -35,7 +36,7 @@ interface SearchResult {
source_name: string;
}
export default function PlayPage() {
function PlayPageClient() {
const searchParams = useSearchParams();
const artRef = useRef<HTMLDivElement>(null);
const artPlayerRef = useRef<any>(null);
@@ -1344,3 +1345,11 @@ export default function PlayPage() {
</div>
);
}
export default function PlayPage() {
return (
<Suspense>
<PlayPageClient />
</Suspense>
);
}