Skip to content

Commit

Permalink
clients/web: fix edit product page always returning 404
Browse files Browse the repository at this point in the history
  • Loading branch information
frankie567 committed Jul 23, 2024
1 parent 5648315 commit e21c883
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { EditProductPage } from '@/components/Products/EditProductPage'
import { useProduct } from '@/hooks/queries'
import { MaintainerOrganizationContext } from '@/providers/maintainerOrganization'
import { notFound, useParams } from 'next/navigation'
import { useParams } from 'next/navigation'
import { useContext } from 'react'

export default function Page() {
Expand All @@ -12,9 +12,7 @@ export default function Page() {

const { data: product } = useProduct(id as string)

if (!product) {
notFound()
}

return <EditProductPage product={product} organization={org} />
return product ? (
<EditProductPage product={product} organization={org} />
) : null
}

0 comments on commit e21c883

Please sign in to comment.