Commit c5b277aa authored by Florent Chehab's avatar Florent Chehab

Fixed search presentation, no more swappable views for performance and dot pagination

parent 80d6f86e
...@@ -9,7 +9,6 @@ import Divider from "@material-ui/core/Divider"; ...@@ -9,7 +9,6 @@ import Divider from "@material-ui/core/Divider";
import Button from "@material-ui/core/Button"; import Button from "@material-ui/core/Button";
import KeyboardArrowLeft from "@material-ui/icons/KeyboardArrowLeft"; import KeyboardArrowLeft from "@material-ui/icons/KeyboardArrowLeft";
import KeyboardArrowRight from "@material-ui/icons/KeyboardArrowRight"; import KeyboardArrowRight from "@material-ui/icons/KeyboardArrowRight";
import SwipeableViews from "react-swipeable-views";
import range from "../../utils/range"; import range from "../../utils/range";
import {APP_ROUTES} from "../../config/appRoutes"; import {APP_ROUTES} from "../../config/appRoutes";
import isEqual from "lodash/isEqual"; import isEqual from "lodash/isEqual";
...@@ -69,35 +68,24 @@ class UnivList extends React.Component { ...@@ -69,35 +68,24 @@ class UnivList extends React.Component {
return ( return (
<div className={classes.root}> <div className={classes.root}>
<SwipeableViews
axis={theme.direction === "rtl" ? "x-reverse" : "x"}
index={this.state.activeStep}
onChangeIndex={(step) => this.handleStepChange(step)}
enableMouseEvents
>
{range(maxSteps).map(page => (
<div key={page}>
<List component="nav">
<Divider/>
{getIndexesOnPage(page).map(
univIdx => (
<CustomNavLink to={APP_ROUTES.forUniversity(universitiesToList[univIdx].id)} key={univIdx}>
<ListItem button divider={true} key={univIdx}>
<ListItemText primary={universitiesToList[univIdx].name}/>
</ListItem>
</CustomNavLink>
)
)}
</List>
</div>
))}
</SwipeableViews>
<List component="nav">
<Divider/>
{getIndexesOnPage(activeStep).map(
univIdx => (
<CustomNavLink to={APP_ROUTES.forUniversity(universitiesToList[univIdx].id)} key={univIdx}>
<ListItem button divider={true} key={univIdx}>
<ListItemText primary={universitiesToList[univIdx].name}/>
</ListItem>
</CustomNavLink>
)
)}
</List>
<MobileStepper <MobileStepper
steps={maxSteps} steps={maxSteps}
position="static" position="static"
variant={"progress"}
activeStep={activeStep} activeStep={activeStep}
className={classes.mobileStepper} className={classes.mobileStepper}
nextButton={ nextButton={
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment