Skip to content

Commit

Permalink
adjusted error mesage
Browse files Browse the repository at this point in the history
  • Loading branch information
chuma-beep committed Oct 24, 2024
1 parent 67cf9a5 commit 92bdaaf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/post/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ export default function PostPage() {
if (newComment.trim()) {
const { data: userData, error: userError } = await supabase.auth.getUser();
if (userError) {
console.error("User Error: ", userError.message);
toast.error("Error fetching user");
// console.error("User Error: ", userError.message);
toast.error("Login to comment");
return;
}

Expand Down Expand Up @@ -323,7 +323,7 @@ export default function PostPage() {
const { data: userData, error: userError } = await supabase.auth.getUser();
if (userError) {
// console.error("User Error: ", userError.message);
toast.error("error");
toast.error("unauthorized");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion app/post/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default function Layout({ children }: { children: ReactNode }) {
</main>

{/* Footer */}
<footer className="bg-gray-100 dark:bg-gray-800 py-4 mt-8">
<footer className="bg-gray-100 dark:bg-gray-800 py-4 mt-8 items-center">
<div className="flex px-4 text-center text-sm">
<MainFooter />
</div>
Expand Down

0 comments on commit 92bdaaf

Please sign in to comment.