Skip to content

Commit 691f581

Browse files
committed
Restaurado continuação da história
1 parent f10761b commit 691f581

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/pages/Landing.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import GitHubIcon from '@material-ui/icons/GitHub';
1111
export default function Landing() {
1212
// const { user, signInWithGoogle } = useAuth();
1313
const history = useHistory();
14-
const { updateStoryValue } = useStory();
14+
const { storyValue, updateStoryValue } = useStory();
1515

1616
async function gameMode(mode: String) {
1717
if (mode === 'new-game') { // Parâmetros para novo jogo do modo história
@@ -58,19 +58,16 @@ export default function Landing() {
5858
}}
5959
>
6060
<Paper className="paper">
61-
{/* <Grid container spacing={2} justify="center">
61+
<Grid container spacing={2} justify="center">
6262
<Button
6363
size="large"
6464
color="primary"
6565
onClick={() => gameMode('story-mode')}
66-
disabled={
67-
// Havendo cookie, há opção de continuar história
68-
String(Cookies.get('storyNumber')) !== 'undefined' ? false : true
69-
}
66+
disabled={storyValue.inGame ? false : true}
7067
>
7168
Continuar História
7269
</Button>
73-
</Grid> */}
70+
</Grid>
7471
<Grid container spacing={2} justify="center">
7572
<Button
7673
size="large"

0 commit comments

Comments
 (0)