feat: add TypeScript definitions for next-auth session with accessToken and user details
Test Suite / test (24.15.0) (push) Has been cancelled

This commit is contained in:
Nils-Johan Gynther
2026-05-04 20:09:21 +02:00
parent afd2607000
commit ffe50e5151
135 changed files with 5 additions and 38 deletions
@@ -0,0 +1,27 @@
import { fetchJson } from '../../../lib/api';
import type { Recipe } from '../../../features/inventory/types';
import Navigation from '../../Navigation';
import RecipeDetailClient from './RecipeDetailClient';
import { notFound } from 'next/navigation';
interface Props {
params: Promise<{ id: string }>;
}
export default async function RecipeDetailPage({ params }: Props) {
const { id } = await params;
let recipe: Recipe;
try {
recipe = await fetchJson<Recipe>(`/api/recipes/${id}`);
} catch {
notFound();
}
return (
<main style={{ padding: '1rem', maxWidth: '900px', margin: '0 auto' }}>
<Navigation />
<RecipeDetailClient recipe={recipe} />
</main>
);
}