Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance the user not found state #311

Open
AndlerRL opened this issue Nov 23, 2024 · 0 comments
Open

Enhance the user not found state #311

AndlerRL opened this issue Nov 23, 2024 · 0 comments
Assignees

Comments

@AndlerRL
Copy link
Contributor

          _:hammer_and_wrench: Refactor suggestion_

Enhance the user not found state.

The current user not found state is too basic. Consider adding a more user-friendly error state with proper styling and navigation options.

-if (!user) return <div>No user found</div>
+if (!user) {
+  return (
+    <div className="flex flex-col items-center justify-center min-h-screen p-4">
+      <h2 className="text-xl font-semibold mb-4">Profile Not Found</h2>
+      <p className="text-gray-600 mb-4">The user profile you're looking for doesn't exist.</p>
+      <a href="/" className="text-blue-500 hover:text-blue-600">
+        Return to Home
+      </a>
+    </div>
+  );
+}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    if (!user) {
      return (
        <div className="flex flex-col items-center justify-center min-h-screen p-4">
          <h2 className="text-xl font-semibold mb-4">Profile Not Found</h2>
          <p className="text-gray-600 mb-4">The user profile you're looking for doesn't exist.</p>
          <a href="/" className="text-blue-500 hover:text-blue-600">
            Return to Home
          </a>
        </div>
      );
    }

Originally posted by @coderabbitai[bot] in #300 (comment)

@Bran18 Bran18 self-assigned this Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants