-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implement Contact Us Modal (Can't Find Apartment + Ask Question) #363
Conversation
[diff-counting] Significant lines: 1235. This diff might be too big! Developer leads are invited to review the code. |
const token = await user!.getIdToken(true); | ||
const data = await apartmentFormDataToReview(apartmentForm); | ||
if (data.name === '' || includesProfanity(data.name) || includesProfanity(data.address)) { | ||
data.name === '' ? setEmptyNameError(true) : setEmptyNameError(false); |
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.
Minor suggestion, this could be simplified to: setEmptyNameError(data.name === ''). Although it doesn't need changing since your current code is good for readability.
@@ -20,13 +16,14 @@ import { DetailedRating, Review } from '../../../../common/types/db-types'; | |||
import { createAuthHeaders, uploadFile } from '../../utils/firebase'; | |||
import ReviewRating from './ReviewRating'; | |||
import { includesProfanity } from '../../utils/profanity'; | |||
import Toast from './Toast'; | |||
import Toast from '../utils/Toast'; | |||
import styles from './ReviewModal.module.scss'; | |||
import DropDown from '../utils/DropDown'; | |||
import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; | |||
import { ReactComponent as XIcon } from '../../assets/xIcon.svg'; |
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.
this line can be removed
{currModal === 'apartment' && cantFindApartmentModal} | ||
{currModal === 'question' && questionModal} | ||
|
||
{currModal != 'contact' && ( |
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.
can be changed to !== to resolve compile warning
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.
Hey Grace,
Great work on the pull request! You've made significant changes and contributions to the website in this PR. All your code follows outstanding code practices and conventions, you made use of many of React's features to reduce re-rendering. I've made a few comments on some minor tweaks that could be adjusted.
During testing, I noticed there is horizontal scrolling in the modal, I presume this was intentional for smaller/mobile devices?
Great work on this PR!
Summary
This pull request is the first step towards implementing the "Contact Us" feature with a "Can't Find Your Apartment" modal and "Ask Us a Question" modal
Test Plan
Notes
This is a WIP PR so I will implement the backend and Ask Us a Question modal in the future.
Breaking Changes