Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. {headRows
  2. // Filter table columns based on user selected input
  3. .filter(item => displayedColumns.includes(item.id))
  4. .map(row => (
  5. <TableCell
  6. key={row.id}
  7. align={row.numeric ? "right" : "left"}
  8. padding={row.disablePadding ? "none" : "default"}
  9. sortDirection={orderBy === row.id ? order : false}
  10. >
  11. <TableSortLabel
  12. active={orderBy === row.id}
  13. direction={order}
  14. onClick={createSortHandler(row.id)}
  15. >
  16. {useTranslation(row.label)}
  17. </TableSortLabel>
  18. </TableCell>
  19. ))}
  20.  
  21. import { useSelector } from "react-redux";
  22.  
  23. export const useTranslations = () =>
  24. useSelector(state => state.translations.data, []);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement