Skip to content

Commit d44c72a

Browse files
committed
Allow shortcuts hook to work if undefined
1 parent 05b6a26 commit d44c72a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/webapp/app/routes/admin._index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,17 @@ export default function AdminDashboardRoute() {
138138
<TableCell isSticky={true}>
139139
<Form method="post" reloadDocument>
140140
<input type="hidden" name="id" value={user.id} />
141-
142141
<Button
143142
type="submit"
144143
name="action"
145144
value="impersonate"
146145
className="mr-2"
147146
variant="tertiary/small"
147+
shortcut={
148+
users.length === 1
149+
? { modifiers: ["mod"], key: "enter", enabledOnInputElements: true }
150+
: undefined
151+
}
148152
>
149153
Impersonate
150154
</Button>

0 commit comments

Comments
 (0)