Skip to content

Commit

Permalink
Remove react swipeable view
Browse files Browse the repository at this point in the history
Related to #113
  • Loading branch information
sebastienbarbier committed Jun 26, 2023
1 parent ae1ee29 commit cb1602e
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 64 deletions.
82 changes: 36 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"dependencies": {
"@date-io/moment": "^2.16.1",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.11.16",
"@mui/lab": "^5.0.0-alpha.111",
"@mui/material": "^5.13.5",
Expand Down Expand Up @@ -92,7 +93,6 @@
"react-redux": "^8.1.1",
"react-router-dom": "^6.13.0",
"react-select": "^5.7.3",
"react-swipeable-views-v18": "^1.1.25",
"redux": "^4.2.1",
"redux-persist": "6.0.0",
"redux-thunk": "^2.4.2",
Expand Down
1 change: 0 additions & 1 deletion src/app/components/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useTheme } from '@mui/material/styles';

import Card from "@mui/material/Card";
import Stack from "@mui/material/Stack";
import SwipeableViews from "react-swipeable-views";

import Container from "@mui/material/Container";
import Button from "@mui/material/Button";
Expand Down
8 changes: 3 additions & 5 deletions src/app/components/Transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useSelector, useDispatch } from "react-redux";
import { useParams, useNavigate } from "react-router-dom";
import moment from "moment";

import SwipeableViews from "react-swipeable-views";
import Box from "@mui/material/Box";

import Card from "@mui/material/Card";
import Button from "@mui/material/Button";
Expand Down Expand Up @@ -284,10 +284,8 @@ export default function Transactions(props) {
</div>
</div>
<div className="indicators hideModalSize">
<SwipeableViews
enableMouseEvents
<Box
style={{ padding: "0 40vw 0 24px" }}
slideStyle={{ padding: "0 0px" }}
>
<div className="view">
<span>Balance&nbsp;</span>
Expand Down Expand Up @@ -331,7 +329,7 @@ export default function Transactions(props) {
)}
</span>
</div>
</SwipeableViews>
</Box>
</div>
<div className="layout_header_tabs wrapperMobile">
<Tabs
Expand Down
10 changes: 3 additions & 7 deletions src/app/components/dashboard/BalanceView.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { useSelector } from "react-redux";
import moment from "moment";
import { useTheme } from "../../theme";

import SwipeableViews from "react-swipeable-views";

import Box from "@mui/material/Box";
import Card from "@mui/material/Card";

import Button from "@mui/material/Button";
Expand All @@ -26,10 +25,7 @@ export default function BalanceView({
});

return (
<SwipeableViews
enableMouseEvents
disabled={disableSwipeableViews}
index={disableSwipeableViews ? 0 : null}
<Box
className="metrics"
style={{ padding: "0 calc(100% - 300px) 0 10px" }}
slideStyle={{ padding: "8px 5px" }}
Expand Down Expand Up @@ -136,6 +132,6 @@ export default function BalanceView({
</p>
</div>
</Card>
</SwipeableViews>
</Box>
);
}
6 changes: 2 additions & 4 deletions src/app/components/dashboard/TrendsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { useSelector } from "react-redux";
import moment from "moment";
import { useTheme } from "../../theme";

import SwipeableViews from "react-swipeable-views";

import Card from "@mui/material/Card";

import Box from "@mui/material/Box";
Expand Down Expand Up @@ -297,7 +295,7 @@ export default function Trends({
};

return (
<SwipeableViews
<Box
disabled={disabled}
index={disabled ? 0 : null}
enableMouseEvents
Expand Down Expand Up @@ -427,6 +425,6 @@ export default function Trends({
See details
</Button>
</Card>
</SwipeableViews>
</Box>
);
}

0 comments on commit cb1602e

Please sign in to comment.