Skip to content

Commit

Permalink
refactor: 유효한 경로가 아닐 시 NotFound폴백
Browse files Browse the repository at this point in the history
  • Loading branch information
khj0426 committed Jun 12, 2024
1 parent eefba54 commit cbffd4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/makeTableOfContent.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function makeTableOfContent({ children }: { children: string }) {
return children?.match(/(?:##|###)(.*)/g) ?? [];
return children.match(/(?:##|###)(.*)/g) ?? [];
}
4 changes: 2 additions & 2 deletions src/app/(root)/(routes)/blog/[slug]/error.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import ErrorFallback from '@/Component/Common/ErrorFallback/Errorfallback';
import NotFoundErrorFallback from "@/Component/Common/ErrorFallback/NotFoundErrorfallback";

export default function BlogSlugErrorPage({
error,
Expand All @@ -9,5 +9,5 @@ export default function BlogSlugErrorPage({
error: Error;
reset: () => void;
}) {
return <ErrorFallback error={error} reset={reset} />;
return <NotFoundErrorFallback />;
}

0 comments on commit cbffd4a

Please sign in to comment.