Fixing eslint issues

This commit is contained in:
Gustavo Lelis 2020-04-06 18:23:21 -03:00 committed by James A. Petts
parent 2131cb5abb
commit a0662c4883
2 changed files with 11 additions and 15 deletions

View File

@ -2,19 +2,13 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Button, ButtonGroup, Icon, IconButton, Typography } from '@ohif/ui';
<<<<<<< HEAD:platform/ui/src/views/StudyList/components/StudyListPagination.js
const StudyListPagination = (props) => {
const [currentPage, setCurrentPage] = useState(1);
=======
const StudyListPagination = ({
onChangePage,
currentPage,
perPage,
onChangePerPage,
}) => {
>>>>>>> d5a288db1... feat: StudyListTable, ExpandedRow, API definitions (#1579):platform/ui/src/components/StudyListPagination/StudyListPagination.js
const navigateToPage = (page) => {
const navigateToPage = page => {
const toPage = page < 1 ? 1 : page;
onChangePage(toPage);
};
@ -26,15 +20,11 @@ const StudyListPagination = ({
<div className="flex items-center">
<div className="relative mr-3">
<select
<<<<<<< HEAD:platform/ui/src/views/StudyList/components/StudyListPagination.js
defaultValue="25"
className="block appearance-none w-full bg-transparent border border-common-active text-white text-base px-2 pr-4 rounded leading-tight focus:outline-none"
=======
defaultValue={perPage}
className="block appearance-none w-full bg-transparent border border-custom-darkSlateBlue text-white text-base px-2 pr-4 rounded leading-tight focus:outline-none"
>>>>>>> d5a288db1... feat: StudyListTable, ExpandedRow, API definitions (#1579):platform/ui/src/components/StudyListPagination/StudyListPagination.js
style={{ height: 28 }}
onChange={(e) => onChangePerPage(e.target.value)}
onChange={e => onChangePerPage(e.target.value)}
onBlur={() => {}}
>
<option value="25">25</option>
<option value="50">50</option>

View File

@ -22,14 +22,20 @@ export const NavGroup = ({ item, sidebarRef }) => {
}, [sidebarRef]);
return (
<div sx={styles.wrapper} data-testid="nav-group">
<div sx={styles.title} onClick={toggleSubheadings}>
<div
sx={styles.title}
onClick={toggleSubheadings}
role="button"
onKeyDown={toggleSubheadings}
tabIndex="0"
>
{item.name}
<ChevronDown sx={styles.chevron({ active: subheadingsVisible })} />
</div>
<div sx={styles.sublinkWrapper} data-testid="nav-group-links">
{menu &&
subheadingsVisible &&
menu.map((menu) => {
menu.map(menu => {
if (currentDoc.route === menu.route) {
return (
<NavLink key={menu.id} item={menu} ref={currentDocRef}>