Skip to content

Commit

Permalink
Bump Typescript to 5.3.2
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Cassidy <[email protected]>
  • Loading branch information
stevecassidy committed Nov 22, 2023
1 parent 5fa1b47 commit 240c144
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 22 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"taffydb": "^2.7.3",
"ts-loader": "^9.4.2",
"type-fest": "^3.10.0",
"typescript": "^4.0.2",
"typescript": "^5.3.2",
"vite": "^4.4.9",
"vite-plugin-svgr": "^3.2.0",
"vite-tsconfig-paths": "^4.2.1",
Expand Down
43 changes: 27 additions & 16 deletions src/gui/components/authentication/cluster_card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,32 @@ function UserSwitcher(props: UserSwitcherProps) {
disablePortal
id={`user-switcher-${props.listing_id}`}
options={userList}
getOptionLabel={option =>
option.name ? option.name : option.username
}
renderOption={(props, option) => (
<Box component="li" {...props}>
{option.name ? (
<span>
{option.name}{' '}
<Chip size={'small'} label={option.username} />
</span>
) : (
option.username
)}
</Box>
)}
getOptionLabel={option => {
if (option) return option.name ? option.name : option.username;
else return '';
}}
renderOption={(props, option) => {
if (option) {
return (
<Box component="li" {...props}>
{option.name ? (
<span>
{option.name}{' '}
<Chip size={'small'} label={option.username} />
</span>
) : (
option.username
)}
</Box>
);
} else {
return (
<Box component="li" {...props}>
Unknown User
</Box>
);
}
}}
value={value}
onChange={(
event: any,
Expand All @@ -148,7 +159,7 @@ function UserSwitcher(props: UserSwitcherProps) {
setValue(newValue);
}}
isOptionEqualToValue={(option, value) =>
option.username === value.username
option && value ? option.username === value.username : false
}
fullWidth
renderInput={params => (
Expand Down

0 comments on commit 240c144

Please sign in to comment.