mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
refactor(ui): use Button loading prop instead of manual Spinner
Address PR #698 review feedback from Gemini Code Assist to use the Button component's built-in loading prop instead of manually rendering Spinner components. The Button component already handles spinner display with correct variant selection (foreground for default/destructive buttons, primary for others), so this simplifies the code and aligns with component abstractions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -86,8 +86,7 @@ export function IssueDetailPanel({
|
||||
{(() => {
|
||||
if (isValidating) {
|
||||
return (
|
||||
<Button variant="default" size="sm" disabled>
|
||||
<Spinner size="sm" variant="foreground" className="mr-1" />
|
||||
<Button variant="default" size="sm" disabled loading>
|
||||
Validating...
|
||||
</Button>
|
||||
);
|
||||
@@ -335,15 +334,9 @@ export function IssueDetailPanel({
|
||||
className="w-full"
|
||||
onClick={loadMore}
|
||||
disabled={loadingMore}
|
||||
loading={loadingMore}
|
||||
>
|
||||
{loadingMore ? (
|
||||
<>
|
||||
<Spinner size="sm" className="mr-2" />
|
||||
Loading...
|
||||
</>
|
||||
) : (
|
||||
'Load More Comments'
|
||||
)}
|
||||
{loadingMore ? 'Loading...' : 'Load More Comments'}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user