Skip to content

Conversation

@Alexander-Gabor
Copy link

No description provided.

Copy link

@MalinSkill MalinSkill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, brilliant theme and Lottie animation!
Something to look into,
The footer interferes with the options buttons on some steps, when there is a lot of text in the description.
Keep it up, it looks awesome you are doing great!

justify-content: center;
align-items: center;
overflow: hidden;
pointer-events: none;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great solution, to not be able to click again

Comment on lines +30 to +32
<LoadingWrapper>
{isLoading && <Loading />}
</LoadingWrapper>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the loading wrapper styling be in the loading component and then conditionally render all at once?

import React from 'react'
import { useSelector, useDispatch } from 'react-redux'
import game, { generateMoves } from 'reducers/game'
import styled, { keyframes } from 'styled-components/macro';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to use macro!

export const GameBoard = () => {
const currentLocation = useSelector((store) => store.game.currentLocation)
const dispatch = useDispatch();
// const isLoading = useSelector((store) => store.ui.isLoading)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If not intended to be used in production, this could be removed

);
})}
</OptionBox>
{currentLocation.coordinates === '1,3' && <div><WinnerText>Well done! You made it out alive!</WinnerText> <Button onClick={() => restartGame()}>Restart</Button></div>}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To show the end of game, you could also have rendered based on actions left. That way it would work even if the backend gets updated with additional coordinates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants