import { getLibrary } from '@/lib/libraries' import { notFound } from 'next/navigation' import GamesView from '@/components/games/GamesView' import MixedView from '@/components/mixed/MixedView' import MoviesView from '@/components/movies/MoviesView' import TvView from '@/components/tv/TvView' interface Props { params: Promise<{ id: string }> searchParams: Promise<{ path?: string }> } export default async function LibraryPage({ params, searchParams }: Props) { const { id } = await params const { path: subpath } = await searchParams const library = getLibrary(id) if (!library) notFound() return (