Skip to content

Commit 60e5e34

Browse files
committed
Add buttons: leave the filled style to the default argument
organization-address.test.ts reads a "default" first argument as a hard-coded organization id. newSkill, createButton and newTeam now take the style as an optional argument that defaults to filled.
1 parent 8d97c03 commit 60e5e34

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎app/src/components/manage/skills-page.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function SkillsPage() {
4747
const { data: hiddenAgents } = useQuery(agentListQueryOptions(true, scope));
4848

4949
const skills = skillList.data ?? [];
50-
const newSkill = (variant: "default" | "outline") => (
50+
const newSkill = (variant: "default" | "outline" = "default") => (
5151
<Button
5252
render={(props) => <Link {...props} {...paths.newSkill()} />}
5353
size="sm"
@@ -60,7 +60,7 @@ export function SkillsPage() {
6060

6161
return (
6262
<PageShell
63-
action={newSkill("default")}
63+
action={newSkill()}
6464
description="Write instructions a Bot follows when someone picks a skill from the / menu. A skill only uses what a Bot can already do, and you choose which Bots offer it."
6565
title="Skills"
6666
>

‎app/src/components/settings/api-keys.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ export function ApiKeysPage() {
103103
const [creating, setCreating] = useState(false);
104104
const [made, setMade] = useState<NewApiKey | null>(null);
105105
const ready = list.data?.state === "ready";
106-
const createButton = (variant: "default" | "outline") => (
106+
const createButton = (variant: "default" | "outline" = "default") => (
107107
<Button onClick={() => setCreating(true)} size="sm" variant={variant}>
108108
<IconPlus />
109109
Create key
110110
</Button>
111111
);
112112
return (
113113
<PageShell
114-
action={ready ? createButton("default") : undefined}
114+
action={ready ? createButton() : undefined}
115115
description="Create a key so a script or another program can use OpenBot as you."
116116
title="API keys"
117117
>

‎app/src/components/teams/teams-page.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function Teams({ paths }: { paths: TeamPaths }) {
4949
const teams = list.data?.pages.flatMap((page) => page.teams) ?? [];
5050
const canCreate = list.data?.pages[0]?.canCreate === true;
5151

52-
const newTeam = (variant: "default" | "outline") => (
52+
const newTeam = (variant: "default" | "outline" = "default") => (
5353
<Button
5454
render={(props) => <Link {...props} {...paths.newTeam()} />}
5555
size="sm"
@@ -62,7 +62,7 @@ function Teams({ paths }: { paths: TeamPaths }) {
6262

6363
return (
6464
<PageShell
65-
action={canCreate ? newTeam("default") : undefined}
65+
action={canCreate ? newTeam() : undefined}
6666
description={TEAMS_DESCRIPTION}
6767
title="Teams"
6868
>

0 commit comments

Comments
 (0)