Skip to content

Commit 110da03

Browse files
author
mpabarca
committed
Fix duplication Not Found Page for wrong version or specification
1 parent ed7fa81 commit 110da03

File tree

1 file changed

+2
-5
lines changed
  • src/app/(authed)/(project-doc)/[...slug]

1 file changed

+2
-5
lines changed

src/app/(authed)/(project-doc)/[...slug]/page.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@ export default function Page() {
3030
{project && version && specification &&
3131
<Documentation url={specification.url} />
3232
}
33-
{project && !version &&
34-
<ErrorMessage text="The selected branch or tag was not found."/>
35-
}
36-
{project && !specification &&
37-
<ErrorMessage text="The selected specification was not found."/>
33+
{project && (!version || !specification) &&
34+
<ErrorMessage text={`The selected ${!version ? "branch or tag" : "specification"} was not found.`}/>
3835
}
3936
{!project && <NotFound/>}
4037
</>

0 commit comments

Comments
 (0)