Skip to content

Commit

Permalink
Revert "Merge branch 'master' into master"
Browse files Browse the repository at this point in the history
This reverts commit 2ebfb9c, reversing
changes made to af22f48.
  • Loading branch information
Th0rgal committed May 24, 2022
1 parent 0a346c8 commit eb2bed7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
21 changes: 15 additions & 6 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import React from 'react'
import Powered from '../components/powered'
import WalletMenu from '../components/walletmenu'
import Link from 'next/link'
import { useStarknet } from '@starknet-react/core'
import { useStarknet, InjectedConnector } from '@starknet-react/core'
import { useRouter } from 'next/router'

export default function Home() {
const { account, hasStarknet, connectBrowserWallet } = useStarknet()
const { account, connect } = useStarknet()
const [connectMenuToggled, setConnectMenuToggled] = React.useState(false);
const router = useRouter()

Expand All @@ -19,11 +19,20 @@ export default function Home() {
<img className={styles.logo} src="/logo.svg" alt="Eykar Logo" />

<button className={
[styles.button, styles.highlighted, styles.toggled].join(" ")} onClick={() => {
[styles.button, styles.play].join(" ")} onClick={() => {
if (InjectedConnector.ready()) {
connect(new InjectedConnector())
router.push('/game/loading');
} else {
setConnectMenuToggled(true)
}
}} >
<div className={styles.button_div}></div>
<p className={styles.button_text}>
Coming soon
<svg className={styles.playicon} fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"></path><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<p className={styles.play_button_text}>
Play
</p>
</button>

Expand Down Expand Up @@ -54,4 +63,4 @@ export default function Home() {
</div>
);

}
}
13 changes: 0 additions & 13 deletions styles/Home.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@
}
}

.button.highlighted.toggled {
cursor: not-allowed;
}

.button.highlighted.toggled:hover .button_div {
border: 0px solid #887b5b;
}

.button.normal {
color : #F3F2ED;
background-color: rgba(0, 0, 0, 0);
Expand All @@ -87,11 +79,6 @@
border: solid 1px #ffe1a9;
}

.button.highlighted.toggled {
color : #c2b697;
border: 1px solid #887b5b;
}

.button.play {
color : #ffe1a9;
background-color: #232020b7;
Expand Down

0 comments on commit eb2bed7

Please sign in to comment.