Skip to content

Commit 855e8b8

Browse files
committed
Add styled error
1 parent fe72d04 commit 855e8b8

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

site/src/pages/UserSettingsPage/ExternalAuthPage/ExternalAuthPageView.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { useTheme } from "@emotion/react";
12
import CachedIcon from "@mui/icons-material/Cached";
23
import LoadingButton from "@mui/lab/LoadingButton";
34
import Badge from "@mui/material/Badge";
@@ -114,6 +115,7 @@ const ExternalAuthRow: FC<ExternalAuthRowProps> = ({
114115
onUnlinkExternalAuth,
115116
onValidateExternalAuth,
116117
}) => {
118+
const theme = useTheme();
117119
const name = app.display_name || app.id || app.type;
118120
const authURL = "/external-auth/" + app.id;
119121

@@ -161,8 +163,16 @@ const ExternalAuthRow: FC<ExternalAuthRowProps> = ({
161163
<TableRow key={app.id}>
162164
<TableCell>
163165
<AvatarData title={name} avatar={avatar} />
164-
{/* TODO: Style this! */}
165-
{link?.validate_error}
166+
{link?.validate_error && (
167+
<>
168+
<span
169+
css={{ paddingLeft: "1em", color: theme.palette.error.light }}
170+
>
171+
Error:{" "}
172+
</span>
173+
{link?.validate_error}
174+
</>
175+
)}
166176
</TableCell>
167177
<TableCell css={{ textAlign: "right" }}>
168178
<LoadingButton

0 commit comments

Comments
 (0)