cms icon indicating copy to clipboard operation
cms copied to clipboard

Fix : Type error in the courseId page and extra breadcrumb seperator

Open amanbairagi30 opened this issue 1 year ago • 0 comments

Problem Statement

1st problem : Type Error in courses / [...coursesId] / page.tsx , where foundContent.children was complaining for having inappropriate type inference for foundContent.children , you can see in below screenshot as well

image

Solution : In the imports , Content type was being imported from @prisma/client but it was not able to detect the children for it , but I changed the import for Content from @prisma/client to @/db/course where the Content type was already present and the error got resolved after that .


2nd Problem : There was extra Breadcrumb Seperator in the BreadCrumbComponent.tsx as you can see the before and after of that

Before : When we are on the test course 1 , then too it was showing an extra Breadcrumb Seperator .

image

Solution

After : Resolved it to come whenever there is any content ahead .

image

amanbairagi30 avatar Apr 12 '24 09:04 amanbairagi30