Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d294d9b

Browse files
committed
Apply Asher's comments
1 parent 2c2be53 commit d294d9b

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

site/src/pages/TasksPage/TasksPage.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ export const MissingExternalAuth: Story = {
245245
});
246246

247247
await step("Renders external authentication", async () => {
248-
await canvas.findByRole("button", { name: /login with github/i });
248+
await canvas.findByRole("button", { name: /connect to github/i });
249249
});
250250
},
251251
};

site/src/pages/TasksPage/TasksPage.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,12 @@ const TaskForm: FC<TaskFormProps> = ({ templates }) => {
213213
const selectedTemplate = templates.find(
214214
(t) => t.id === selectedTemplateId,
215215
) as Template;
216-
const { externalAuth, externalAuthError, isPollingExternalAuth } =
217-
useExternalAuth(selectedTemplate.active_version_id);
216+
const {
217+
externalAuth,
218+
externalAuthError,
219+
isPollingExternalAuth,
220+
isLoadingExternalAuth,
221+
} = useExternalAuth(selectedTemplate.active_version_id);
218222
const missedExternalAuth = externalAuth?.filter(
219223
(auth) => !auth.optional && !auth.authenticated,
220224
);
@@ -309,7 +313,11 @@ const TaskForm: FC<TaskFormProps> = ({ templates }) => {
309313

310314
<Button size="sm" type="submit" disabled={isMissingExternalAuth}>
311315
<Spinner
312-
loading={createTaskMutation.isPending || isPollingExternalAuth}
316+
loading={
317+
isLoadingExternalAuth ||
318+
isPollingExternalAuth ||
319+
createTaskMutation.isPending
320+
}
313321
>
314322
<SendIcon />
315323
</Spinner>
@@ -374,7 +382,7 @@ const ExternalAuthButtons: FC<ExternalAuthButtonProps> = ({
374382
</Button>
375383
</TooltipTrigger>
376384
<TooltipContent>
377-
Retry connect to {auth.display_name}
385+
Retry connecting to {auth.display_name}
378386
</TooltipContent>
379387
</Tooltip>
380388
</TooltipProvider>

0 commit comments

Comments
 (0)