Skip to content

Commit

Permalink
add mobile warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mluogh committed Sep 16, 2023
1 parent 794fee4 commit c518ef0
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 6 deletions.
35 changes: 35 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"phaser": "^3.60.0",
"pubsub-js": "^1.9.4",
"react": "^18.2.0",
"react-device-detect": "^2.2.3",
"react-dom": "^18.2.0",
"react-ga4": "^2.1.0",
"react-github-login-button": "^1.0.1",
Expand Down
20 changes: 14 additions & 6 deletions src/components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from "@chakra-ui/react";
import GoogleButton from "react-google-button";
import GithubButton from "react-github-login-button";
import { BrowserView, MobileView } from "react-device-detect";

export const Login = () => {
const handleGitHubLogin = async () => {
Expand Down Expand Up @@ -99,12 +100,19 @@ export const Login = () => {
fontFamily={"vt323"}
marginBottom={3}
>
<GithubButton onClick={handleGitHubLogin}>
Sign in with GitHub
</GithubButton>
<GoogleButton onClick={handleGoogleLogin}>
Sign in with Google
</GoogleButton>
<BrowserView>
<GithubButton onClick={handleGitHubLogin}>
Sign in with GitHub
</GithubButton>
<GoogleButton onClick={handleGoogleLogin}>
Sign in with Google
</GoogleButton>
</BrowserView>
<MobileView>
<Text fontSize={"2xl"}>
Demo requires keyboard. Use computer to play!
</Text>
</MobileView>
</VStack>
</Box>
</VStack>
Expand Down

0 comments on commit c518ef0

Please sign in to comment.