Skip to content

Commit

Permalink
syntax cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdiehl committed Mar 15, 2024
1 parent 2c45009 commit 815cef8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion app/src/atoms/InputField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ function Input(props: InputFieldProps): JSX.Element {
paddingTop={SPACING.spacing4}
flexDirection={DIRECTION_COLUMN}
>
<Flex css={FORM_BOTTOM_SPACE_STYLE}>{props.caption}</Flex>
{props.caption != null ? (
<Flex css={FORM_BOTTOM_SPACE_STYLE}>{props.caption}</Flex>
) : null}
{props.secondaryCaption != null ? (
<Flex css={FORM_BOTTOM_SPACE_STYLE}>{props.secondaryCaption}</Flex>
) : null}
Expand Down
3 changes: 2 additions & 1 deletion app/src/atoms/MenuList/DropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element {

return (
<Flex flexDirection={DIRECTION_COLUMN}>
{title !== undefined ? (
{title !== null ? (
<StyledText as="labelSemiBold" paddingBottom={SPACING.spacing8}>
{title}
</StyledText>
Expand Down Expand Up @@ -120,6 +120,7 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element {
left={SPACING.spacing16}
flexDirection={DIRECTION_COLUMN}
width={width}
ref={dropDownMenuWrapperRef}
>
{filterOptions.map((option, index) => (
<MenuItem
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/NetworkSettings/SetWifiCred.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function SetWifiCred({
onChange={e => setPassword(e.target.value)}
type={showPassword ? 'text' : 'password'}
onBlur={e => e.target.focus()}
autoFocus={true}
autoFocus
/>
</Box>
<Btn
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/NetworkSettings/SetWifiSsid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function SetWifiSsid({
type="text"
error={errorMessage}
onBlur={e => e.target.focus()}
autoFocus={true}
autoFocus
/>
</Flex>
<Flex width="100%" position={POSITION_FIXED} left="0" bottom="0">
Expand Down

0 comments on commit 815cef8

Please sign in to comment.