Skip to content

Commit c59abfd

Browse files
committed
Apply PR review suggestions
1 parent 09441fe commit c59abfd

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

site/src/pages/CreateWorkspacePage/ExternalAuthBanner/ExternalAuthBanner.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const MockExternalAuth: TemplateVersionExternalAuth = {
1212
};
1313

1414
const meta: Meta<typeof ExternalAuthBanner> = {
15-
title: "pages/CreateWorkspacePage/ExternalAuthBanner/ExternalAuthBanner",
15+
title: "pages/CreateWorkspacePage/ExternalAuthBanner",
1616
component: ExternalAuthBanner,
1717
};
1818

site/src/pages/CreateWorkspacePage/ExternalAuthBanner/ExternalAuthBanner.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ import { Interpolation, Theme } from "@emotion/react";
22
import { TemplateVersionExternalAuth } from "api/typesGenerated";
33
import { ExternalAuthPollingState } from "../CreateWorkspacePage";
44
import { ExternalAuthItem } from "./ExternalAuthItem";
5+
import { FC } from "react";
56

67
type ExternalAuthBannerProps = {
78
providers: TemplateVersionExternalAuth[];
89
pollingState: ExternalAuthPollingState;
910
onStartPolling: () => void;
1011
};
1112

12-
export const ExternalAuthBanner = ({
13+
export const ExternalAuthBanner: FC<ExternalAuthBannerProps> = ({
1314
providers,
1415
pollingState,
1516
onStartPolling,
16-
}: ExternalAuthBannerProps) => {
17+
}) => {
1718
return (
1819
<section css={styles.root}>
1920
<div css={styles.content}>

site/src/pages/CreateWorkspacePage/ExternalAuthBanner/ExternalAuthItem.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import DoneAllOutlined from "@mui/icons-material/DoneAllOutlined";
33
import LoadingButton from "@mui/lab/LoadingButton";
44
import { TemplateVersionExternalAuth } from "api/typesGenerated";
55
import { ExternalImage } from "components/ExternalImage/ExternalImage";
6-
import { ComponentProps, useEffect, useState } from "react";
6+
import { FC, useEffect, useState } from "react";
77
// eslint-disable-next-line no-restricted-imports -- used to allow extension with "component"
8-
import Box from "@mui/material/Box";
8+
import Box, { BoxProps } from "@mui/material/Box";
99

1010
type Status = "idle" | "connecting";
1111

@@ -14,15 +14,15 @@ type ExternalAuthItemProps = {
1414
isPolling: boolean;
1515
defaultStatus?: Status;
1616
onStartPolling: () => void;
17-
} & ComponentProps<typeof Box>;
17+
} & BoxProps;
1818

19-
export const ExternalAuthItem = ({
19+
export const ExternalAuthItem: FC<ExternalAuthItemProps> = ({
2020
provider,
2121
isPolling,
2222
defaultStatus = "idle",
2323
onStartPolling,
2424
...boxProps
25-
}: ExternalAuthItemProps) => {
25+
}) => {
2626
const [status, setStatus] = useState(defaultStatus);
2727

2828
useEffect(() => {

0 commit comments

Comments
 (0)