-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update dive log screens and defaults #70
Conversation
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.
Looks good, apart from the delete dive log function that should be moved to the file where similar functions live.
src/Screens/Logs/Log.tsx
Outdated
const url = `${config.API_ENDPOINT}/review/delete?review_id=${diveLog.review.id}`; | ||
fetch(url, { | ||
method: 'POST', | ||
headers: { |
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.
I think we should move this function to redux/slices/dive-logs/api
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.
fixed
: user?.unit === 'imperial' | ||
? 60 | ||
: 20, | ||
: undefined, |
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.
Are you sure initialising to undefined is a great idea?
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.
yeah, i don't want users to accidentally submit incorrect values. i'd rather have it be undefined
Edits to profile page:
![image](https://user-images.githubusercontent.com/63934597/189572187-2ca062fc-20ad-4fe1-b9a6-b47a491243ae.png)