Skip to content

Commit

Permalink
Remove meta data from recipe edit page
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreasgdp committed Oct 20, 2023
1 parent 36c1f32 commit 838b0fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
22 changes: 1 addition & 21 deletions src/app/(dashboard)/dashboard/recipe/[recipeId]/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { serverClient } from '@/app/_trpc/serverClient';
import { EditRecipeForm } from '@/components/forms/recipe/UpdateRecipeForm';
import { Breadcrumbs } from '@/components/pagers/breadcrumbs';
import { Shell } from '@/components/shells/shell';
import { toTitleCase } from '@/lib/utils';
import { currentUser } from '@clerk/nextjs/server';
import { notFound } from 'next/navigation';

Expand All @@ -12,26 +11,7 @@ interface ProductPageProps {
};
}

export async function generateMetadata({ params }: ProductPageProps) {
if (!params.recipeId) {
return {};
}

const recipe = await serverClient.recipe
.getRecipe({ id: params.recipeId })
.catch(() => null);

if (!recipe) {
return {};
}

return {
title: toTitleCase(recipe.title),
description: recipe.description ?? undefined,
};
}

export default async function ProductPage({
export default async function RecipeEditPage({
params,
}: Readonly<ProductPageProps>) {
if (!params.recipeId) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(dashboard)/dashboard/recipe/[recipeId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function generateMetadata({ params }: ProductPageProps) {
};
}

export default async function ProductPage({
export default async function RecipeViewPage({
params,
}: Readonly<ProductPageProps>) {
if (!params.recipeId) {
Expand Down

0 comments on commit 838b0fd

Please sign in to comment.