mirror of
https://github.com/pomber/git-history.git
synced 2024-11-26 08:35:07 +03:00
Merge pull request #50 from bchristie/master
Enable mobile gesture support
This commit is contained in:
commit
47e29bde98
@ -8,6 +8,7 @@
|
||||
"react": "^16.8.1",
|
||||
"react-dom": "^16.8.1",
|
||||
"react-scripts": "2.1.3",
|
||||
"react-swipeable": "^4.3.2",
|
||||
"react-use": "^5.2.2"
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { getSlides } from "./differ";
|
||||
import useSpring from "react-use/lib/useSpring";
|
||||
import Swipeable from "react-swipeable"
|
||||
import Slide from "./slide";
|
||||
import "./comment-box.css";
|
||||
|
||||
@ -109,7 +110,12 @@ export default function History({ commits, language }) {
|
||||
currentIndex={current}
|
||||
selectCommit={index => setTarget(index)}
|
||||
/>
|
||||
<Slide time={current - index} lines={slideLines[index]} />
|
||||
<Swipeable
|
||||
onSwipedLeft={nextSlide}
|
||||
onSwipedRight={prevSlide}
|
||||
>
|
||||
<Slide time={current - index} lines={slideLines[index]} />
|
||||
</Swipeable>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user