-
Notifications
You must be signed in to change notification settings - Fork 323
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
W12-Labyrinth by Maja-Zimnoch & Ylva-Karlsson #200
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: majazimnoch <[email protected]>
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.
Code review by Nina Ströyer, Emilia Granström Anundi and Sandra Olsson.
Really good job, we really like the styling and the code is very clean. Your labyrinth works as it should and we can not see any obvious errors. Thumbs up!
"eslint": "^8.21.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-jsx-a11y": "^6.6.1", | ||
"eslint-plugin-react": "^7.30.1", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"lottie-react": "^2.4.0", | ||
"nes.css": "^2.3.0", |
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.
Did you use this for this project? It's a cool feature!
|
||
const onFormSubmit = (event) => { | ||
event.preventDefault(); | ||
dispatch(labyrinth.actions.setUserName(`${uuidv4()}/${usernameInputValue}`)); |
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 could also add this in your reducer, and then you would not need to use the uuidv4 and/or uuidv5: ```
setUsername: (state, action) => {
state.username = ${new Date().getTime()}+${action.payload}
},
useEffect(() => { | ||
setLoading(isLoading); | ||
}, [isLoading]); | ||
return ( |
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.
To control the duration of the animation, we added this code after the last dispatch in our thunk(s):
setTimeout(() => { dispatch(loading.actions.setLoading(false)) }, 1500). You can also put the speed at 1.0 to slow your animation down a bit more.
https://w12-labyrinth-by-maja-and-ylva.netlify.app/