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) { if (isValidating) {
return ( return (
<Button variant="default" size="sm" disabled> <Button variant="default" size="sm" disabled loading>
<Spinner size="sm" variant="foreground" className="mr-1" />
Validating... Validating...
</Button> </Button>
); );
@@ -335,15 +334,9 @@ export function IssueDetailPanel({
className="w-full" className="w-full"
onClick={loadMore} onClick={loadMore}
disabled={loadingMore} disabled={loadingMore}
loading={loadingMore}
> >
{loadingMore ? ( {loadingMore ? 'Loading...' : 'Load More Comments'}
<>
<Spinner size="sm" className="mr-2" />
Loading...
</>
) : (
'Load More Comments'
)}
</Button> </Button>
)} )}
</div> </div>