Skip to content

Commit

Permalink
refactor: convert cube animation to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
ridvanaltun committed Aug 9, 2023
1 parent b54d595 commit 6145a50
Show file tree
Hide file tree
Showing 7 changed files with 284 additions and 311 deletions.
4 changes: 3 additions & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ const CustomSwipeButton = () => {

ignoreWarnings();

const STORIES = createStories();

const App = () => {
return (
<SafeAreaView style={styles.container}>
<StatusBar backgroundColor="#fff" barStyle="dark-content" />
<Story
data={createStories()}
data={STORIES}
duration={10}
// customStoryView={({ index }) => {
// return (
Expand Down
10 changes: 0 additions & 10 deletions src/animations/AndroidCubeEffect.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class AndroidCubeEffect extends React.Component {

this.state = {
currentPage: 0,
scrollLockPage: this.pages[this.props.scrollLockPage],
};
}

Expand Down Expand Up @@ -102,14 +101,6 @@ class AndroidCubeEffect extends React.Component {
};
}

UNSAFE_componentWillReceiveProps(props) {
this.setState({
scrollLockPage: props.scrollLockPage
? this.pages[props.scrollLockPage]
: undefined,
});
}

/*
@page: index
*/
Expand Down Expand Up @@ -265,7 +256,6 @@ class AndroidCubeEffect extends React.Component {

AndroidCubeEffect.propTypes = {
callBackAfterSwipe: PropTypes.func,
scrollLockPage: PropTypes.number,
};

const styles = StyleSheet.create({
Expand Down
292 changes: 0 additions & 292 deletions src/animations/CubeNavigationHorizontal.js

This file was deleted.

Loading

0 comments on commit 6145a50

Please sign in to comment.