-
Notifications
You must be signed in to change notification settings - Fork 14
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
chore(ui): alternative table extras show current table name instead of database #259
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @duyet - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
@@ -41,7 +41,7 @@ export async function AlternativeTables({ | |||
className="group flex flex-row gap-2 text-muted-foreground" | |||
> | |||
<CardStackMinusIcon className="size-3" /> | |||
{database} | |||
{table} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Potential variable name confusion
The change from {database}
to {table}
might be intentional, but it could lead to confusion if the context is not clear. Ensure that this change aligns with the intended logic and that the variable names are consistent and descriptive.
import { ErrorAlert } from '@/components/error-alert' | ||
import { SingleLineSkeleton, TableSkeleton } from '@/components/skeleton' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (performance): Consider lazy loading components
For performance optimization, consider lazy loading the components if they are not immediately needed. This can help reduce the initial load time of the page.
import { ErrorAlert } from '@/components/error-alert' | |
import { SingleLineSkeleton, TableSkeleton } from '@/components/skeleton' | |
import dynamic from 'next/dynamic' | |
const ErrorAlert = dynamic(() => import('@/components/error-alert')) | |
const SingleLineSkeleton = dynamic(() => import('@/components/skeleton').then(mod => mod.SingleLineSkeleton)) | |
const TableSkeleton = dynamic(() => import('@/components/skeleton').then(mod => mod.TableSkeleton)) |
<> | ||
<TableSkeleton /> | ||
<TableSkeleton cols={5} /> | ||
<ErrorAlert message="Error message" query="SELECT 1" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Hardcoded error message and query
Consider making the error message and query dynamic or configurable. Hardcoding these values can limit the reusability and flexibility of the ErrorAlert
component.
<ErrorAlert message="Error message" query="SELECT 1" /> | |
const errorMessage = "Error message"; | |
const errorQuery = "SELECT 1"; | |
<ErrorAlert message={errorMessage} query={errorQuery} /> |
No description provided.