Skip to content

Commit 3ee2e6b

Browse files
committed
Adding wrapper around createWorkspace back
1 parent f2ef6b8 commit 3ee2e6b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/dashboard/src/workspaces/CreateWorkspacePage.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ export function CreateWorkspacePage() {
104104
[createWorkspaceMutation, history, repo, selectedIde, selectedWsClass, team?.id, useLatestIde],
105105
);
106106

107+
// Need a wrapper here so we call createWorkspace w/o any arguments
108+
const onClickCreate = useCallback(() => createWorkspace(), [createWorkspace]);
109+
107110
if (SelectAccountPayload.is(selectAccountError)) {
108111
return (
109112
<SelectAccountModal
@@ -146,7 +149,7 @@ export function CreateWorkspacePage() {
146149
</div>
147150
<div className="w-full flex justify-end mt-6 space-x-2 px-6">
148151
<Button
149-
onClick={createWorkspace}
152+
onClick={onClickCreate}
150153
loading={createWorkspaceMutation.isLoading}
151154
disabled={!repo || repo.length === 0 || !!errorIde || !!errorWsClass}
152155
>

0 commit comments

Comments
 (0)