Skip to content

Commit

Permalink
Rafactor - prettify changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinnDimitroff committed Oct 7, 2020
1 parent 99d828f commit 557e3a8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 2 additions & 4 deletions cypress/cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@
"videosFolder": "videos",
"viewportWidth": 1280,
"viewportHeight": 720,
"blockHosts": [
"source.unsplash.com"
]
}
"blockHosts": ["source.unsplash.com"]
}
2 changes: 1 addition & 1 deletion cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
"cypress": "^5.1.0",
"cypress-skip-and-only-ui": "^1.2.7"
}
}
}
12 changes: 8 additions & 4 deletions packages/ra-ui-materialui/src/list/SimpleList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ const SimpleList: FC<SimpleListProps> = props => {
>
<ListItem
button={!!linkType as any}
style={rowStyle ? rowStyle(data[id], rowIndex) : null}
style={
rowStyle
? rowStyle(data[id], rowIndex)
: undefined
}
>
{leftIcon && (
<ListItemIcon>
Expand Down Expand Up @@ -190,7 +194,7 @@ export interface SimpleListProps extends Omit<ListProps, 'classes'> {
rightIcon?: FunctionToElement;
secondaryText?: FunctionToElement;
tertiaryText?: FunctionToElement;
rowStyle?: (record: Record, index: number) => any;
rowStyle?: (record: Record, index: number) => any;
}

const useLinkOrNotStyles = makeStyles(
Expand Down Expand Up @@ -227,8 +231,8 @@ const LinkOrNot: FC<LinkOrNotProps> = ({
{children}
</Link>
) : (
<span>{children}</span>
);
<span>{children}</span>
);
};

export type FunctionLinkType = (record: Record, id: Identifier) => string;
Expand Down

0 comments on commit 557e3a8

Please sign in to comment.