Skip to content

Commit 0f65910

Browse files
authored
Merge pull request #103 from daithihearn/disable-pull-to-refresh
Disabling pull to refresh
2 parents 7f6a296 + 561549b commit 0f65910

File tree

3 files changed

+47
-48
lines changed

3 files changed

+47
-48
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"react-router": "^6.6.2",
4545
"react-router-config": "^5.1.1",
4646
"react-router-dom": "^6.6.2",
47-
"react-simple-pull-to-refresh": "^1.3.3",
4847
"react-stomp-hooks": "2.1.0",
4948
"react-viewer": "^3.2.2",
5049
"reactstrap": "9.1.5",

src/pages/Game/Game.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useCallback, useEffect } from "react"
22
import GameWrapper from "../../components/Game/GameWrapper"
33
import GameOver from "../../components/Game/GameOver"
44
import GameService from "../../services/GameService"
5-
import PullToRefresh from "react-simple-pull-to-refresh"
5+
// import PullToRefresh from "react-simple-pull-to-refresh"
66

77
import { withAuthenticationRequired } from "@auth0/auth0-react"
88

@@ -13,7 +13,7 @@ import { useSnackbar } from "notistack"
1313
import { getIsGameActive, resetGame } from "../../caches/GameSlice"
1414
import { clearAutoPlay } from "../../caches/AutoPlaySlice"
1515
import { clearMyCards } from "../../caches/MyCardsSlice"
16-
import RefreshingData from "../../components/icons/RefreshingData"
16+
// import RefreshingData from "../../components/icons/RefreshingData"
1717
import parseError from "../../utils/ErrorUtils"
1818

1919
const Game = () => {
@@ -45,17 +45,17 @@ const Game = () => {
4545
}, [id])
4646

4747
return (
48-
<PullToRefresh
49-
onRefresh={fetchData}
50-
refreshingContent={<RefreshingData />}>
51-
<div className="app carpet">
52-
<div className="game_wrap">
53-
<div className="game_container">
54-
{isGameActive ? <GameWrapper /> : <GameOver />}
55-
</div>
48+
// <PullToRefresh
49+
// onRefresh={fetchData}
50+
// refreshingContent={<RefreshingData />}>
51+
<div className="app carpet">
52+
<div className="game_wrap">
53+
<div className="game_container">
54+
{isGameActive ? <GameWrapper /> : <GameOver />}
5655
</div>
5756
</div>
58-
</PullToRefresh>
57+
</div>
58+
// </PullToRefresh>
5959
)
6060
}
6161

src/pages/Home/Home.tsx

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import StartNewGame from "../../components/StartNewGame/StartNewGame"
66
import MyGames from "../../components/MyGames/MyGames"
77
import GameStats from "../../components/GameStats/GameStats"
88
import { withAuthenticationRequired } from "@auth0/auth0-react"
9-
import PullToRefresh from "react-simple-pull-to-refresh"
9+
// import PullToRefresh from "react-simple-pull-to-refresh"
1010

1111
import { useAppDispatch, useAppSelector } from "../../caches/hooks"
1212
import { getMyProfile } from "../../caches/MyProfileSlice"
@@ -40,43 +40,43 @@ const Home = () => {
4040
}, [])
4141

4242
return (
43-
<PullToRefresh
44-
onRefresh={fetchData}
45-
refreshingContent={<RefreshingData />}>
46-
<div className="app carpet">
47-
<div className="game_wrap">
48-
<div className="game_container">
49-
{!myProfile.isPlayer && !myProfile.isAdmin ? (
50-
<CardGroup>
51-
<Card className="p-6">
52-
<CardHeader tag="h2">
53-
You are successfully logged in but don't
54-
yet have any access permissions. Please
55-
contact Daithi to get access.
56-
</CardHeader>
57-
</Card>
58-
</CardGroup>
59-
) : (
60-
<div>
61-
{myProfile.isPlayer ? (
62-
<>
63-
<MyGames />
64-
<Divider />
65-
<Divider />
66-
<Divider />
67-
<GameStats />
68-
<Divider />
69-
<Divider />
70-
<Divider />
71-
</>
72-
) : null}
73-
{myProfile.isAdmin ? <StartNewGame /> : null}
74-
</div>
75-
)}
76-
</div>
43+
// <PullToRefresh
44+
// onRefresh={fetchData}
45+
// refreshingContent={<RefreshingData />}>
46+
<div className="app carpet">
47+
<div className="game_wrap">
48+
<div className="game_container">
49+
{!myProfile.isPlayer && !myProfile.isAdmin ? (
50+
<CardGroup>
51+
<Card className="p-6">
52+
<CardHeader tag="h2">
53+
You are successfully logged in but don't yet
54+
have any access permissions. Please contact
55+
Daithi to get access.
56+
</CardHeader>
57+
</Card>
58+
</CardGroup>
59+
) : (
60+
<div>
61+
{myProfile.isPlayer ? (
62+
<>
63+
<MyGames />
64+
<Divider />
65+
<Divider />
66+
<Divider />
67+
<GameStats />
68+
<Divider />
69+
<Divider />
70+
<Divider />
71+
</>
72+
) : null}
73+
{myProfile.isAdmin ? <StartNewGame /> : null}
74+
</div>
75+
)}
7776
</div>
7877
</div>
79-
</PullToRefresh>
78+
</div>
79+
// </PullToRefresh>
8080
)
8181
}
8282

0 commit comments

Comments
 (0)