-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
labyrinth Eliane &Vittoria #10
base: main
Are you sure you want to change the base?
Conversation
second fetch
started styling, added loading page
responsiveness, added new message for end of game, not fully working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well structured app! UX/UI makes sense, I like that you've put some extra thought into it 😊 Keep up the good work!
<input | ||
className="home-input" | ||
type="text" | ||
placeholder="Enter username" | ||
value={inputUsername} | ||
onChange={handleUsernameChange} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a maxLength on this since it's affecting your UI (in the paragraph)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plus make sure the input is not empty because then your app breaks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice that you included Router!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this idea! 😍
useEffect(() => { | ||
const handleKeyPress = (e) => { | ||
if (e.key === 'ArrowUp') { | ||
handleDirectionClick({ type: 'move', direction: 'North' }) | ||
} else if (e.key === 'ArrowDown') { | ||
handleDirectionClick({ type: 'move', direction: 'South' }) | ||
} else if (e.key === 'ArrowLeft') { | ||
handleDirectionClick({ type: 'move', direction: 'West' }) | ||
} else if (e.key === 'ArrowRight') { | ||
handleDirectionClick({ type: 'move', direction: 'East' }) | ||
} | ||
} | ||
|
||
document.addEventListener('keydown', handleKeyPress) | ||
return () => { | ||
document.removeEventListener('keydown', handleKeyPress) | ||
} | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh ⭐
const [showMap, setShowMap] = useState(false) | ||
// added style based on coordinates | ||
useEffect(() => { | ||
console.log('Coordinates:', gameData.coordinates) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this in production
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐
Netlify link
https://maze-game-adventure.netlify.app/
Collaborators
[vittoriamatteoli, El1an3]