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:
Shirone
2026-01-25 14:07:17 +01:00
parent 98d98cc056
commit 80ef21c8d0

View File

@@ -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>