Dev X: Destructure props in functional component's argument (#2582)

This commit is contained in:
RachelElysia
2021-10-22 11:34:45 -04:00
committed by GitHub
parent 70dc68f329
commit 403ef5cc59
43 changed files with 195 additions and 204 deletions
@@ -5,9 +5,7 @@ interface IHeaderCellProps {
isSortedDesc?: boolean;
}
const HeaderCell = (props: IHeaderCellProps): JSX.Element => {
const { value, isSortedDesc } = props;
const HeaderCell = ({ value, isSortedDesc }: IHeaderCellProps): JSX.Element => {
let sortArrowClass = "";
if (isSortedDesc === undefined) {
sortArrowClass = "";