Skip to content

Commit

Permalink
fix(console): return 404 when template is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Redm4x committed Aug 28, 2024
1 parent c19b0e3 commit 6c6e0a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/deploy-web/src/pages/templates/[templateId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ export async function getServerSideProps({ params }) {
const templates = categories.flatMap(x => x.templates);
const template = templates.find(x => x.id === params?.templateId);

if (!template) {
return {
notFound: true
};
}

return {
props: {
templateId: params?.templateId,
Expand Down

0 comments on commit 6c6e0a9

Please sign in to comment.