diff --git a/src/app/error.tsx b/src/app/error.tsx
index 518afa1..9e2d2c1 100644
--- a/src/app/error.tsx
+++ b/src/app/error.tsx
@@ -7,6 +7,8 @@ export default function Error({
error: Error;
reset: () => void;
}) {
+ console.log(error);
+
return (
@@ -14,6 +16,7 @@ export default function Error({
Oops it looks like we've run into an issue.
+ );
+}
diff --git a/src/app/profile/[id]/page.tsx b/src/app/profile/[id]/page.tsx
index 8636556..70c5f8d 100644
--- a/src/app/profile/[id]/page.tsx
+++ b/src/app/profile/[id]/page.tsx
@@ -1,3 +1,4 @@
+import NotFound from '@/app/not-found';
import UserPosts from '@/components/UserPosts';
import UserProfile from '@/components/UserProfile';
import { getConvexClient } from '@/lib/convex';
@@ -19,8 +20,7 @@ export default async function UserProfilePage({
});
if (user === 'USER_NOT_FOUND') {
- // TODO: Show real not found component
- return
Not Found
;
+ return
;
}
return (
diff --git a/src/components/DisplayPost.tsx b/src/components/DisplayPost.tsx
index d638976..77f5ab2 100644
--- a/src/components/DisplayPost.tsx
+++ b/src/components/DisplayPost.tsx
@@ -1,9 +1,10 @@
'use client';
+import NotFound from '@/app/not-found';
+import { useRouter } from '@/hooks';
import { useUser } from '@clerk/nextjs';
import { useMutation, useQuery } from 'convex/react';
import Image from 'next/image';
-import { useRouter } from '@/hooks';
import { useEffect, useRef } from 'react';
import { api } from '../../convex/_generated/api';
import { Id } from '../../convex/_generated/dataModel';
@@ -62,8 +63,7 @@ export default function DisplayPost({
}
if (post === 'POST_NOT_FOUND' || post === 'USER_FOR_POST_NOT_FOUND') {
- // TODO: Return actual not found component
- return
Not Found
;
+ return
;
}
if (post !== undefined && user.isLoaded) {
diff --git a/src/components/EditPostForm.tsx b/src/components/EditPostForm.tsx
index 8929c48..e77ad94 100644
--- a/src/components/EditPostForm.tsx
+++ b/src/components/EditPostForm.tsx
@@ -1,5 +1,6 @@
'use client';
+import NotFound from '@/app/not-found';
import { useRouter } from '@/hooks';
import { useUser } from '@clerk/nextjs';
import { useMutation, useQuery } from 'convex/react';
@@ -22,8 +23,7 @@ export default function EditPostForm({ postId }: { postId: string }) {
}
if (post === 'POST_NOT_FOUND' || post === 'USER_FOR_POST_NOT_FOUND') {
- // TODO: Return actual not found component
- return
Not Found
;
+ return
;
}
async function submitAction({