Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Commit 25186f7

Browse files
committed
refactor: move add provider button on top
1 parent 48feb98 commit 25186f7

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

src/features/providers/components/provider-form.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ export function ProviderForm({ provider, setProvider }: Props) {
113113
>
114114
<Label>Api key</Label>
115115
<Input
116-
placeholder="Update the provider API key"
116+
placeholder={
117+
provider.api_key === undefined
118+
? "Update the provider API key"
119+
: "Specify the provider API key"
120+
}
117121
value={provider.api_key ?? ""}
118122
/>
119123
</TextField>

src/routes/route-providers.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ import {
66
Card,
77
LinkButton,
88
CardBody,
9-
CardFooter,
109
} from "@stacklok/ui-kit";
1110
import { twMerge } from "tailwind-merge";
12-
import { Plus } from "@untitled-ui/icons-react";
11+
import { PlusSquare } from "@untitled-ui/icons-react";
1312
import { TableProviders } from "@/features/providers/components/table-providers";
1413
import { Outlet } from "react-router-dom";
1514

@@ -22,20 +21,14 @@ export function RouteProvider({ className }: { className?: string }) {
2221
</Breadcrumbs>
2322
<Heading level={4} className="mb-4 flex items-center justify-between">
2423
Providers
24+
<LinkButton className="w-fit" href="/providers/new">
25+
<PlusSquare /> Add Provider
26+
</LinkButton>
2527
</Heading>
2628
<Card className={twMerge(className, "shrink-0")}>
2729
<CardBody>
2830
<TableProviders />
2931
</CardBody>
30-
<CardFooter className="justify-between">
31-
<LinkButton
32-
className="w-fit"
33-
href="/providers/new"
34-
variant="tertiary"
35-
>
36-
<Plus /> Add Provider
37-
</LinkButton>
38-
</CardFooter>
3932
</Card>
4033

4134
<Outlet />

0 commit comments

Comments
 (0)