-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: added basic components for form toggling #102
Conversation
jadeallencook
commented
Nov 26, 2023
•
edited
Loading
edited
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
LGTM, left some thoughts
src/forms/FormStatusForm/index.tsx
Outdated
const [status, setStatus] = useState<boolean>(false); | ||
|
||
const { requestFormStatus, hasFetchedRequestFormStatus } = useContext( | ||
RequestFormStatusContext | ||
); | ||
|
||
useEffect(() => { | ||
setStatus(requestFormStatus); | ||
}, [requestFormStatus]); |
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.
Same here, useQuery
cached based on the key
field so you can just query multiple times and it should only send 1 request; I think you then wouldn't need to use context at all
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.
Was able to useQuery
in the FormStatusForm
component, but the AidRequestPage
was giving me this error:
FirebaseError: Firebase: Need to provide options, when not being deployed to hosting via source. (app/no-options)
I'm going to move forward with my current changes, and either we can address this later or create a guideline to follow this pattern in the next release.