Skip to content
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

Merged
merged 11 commits into from
Dec 1, 2023

Conversation

jadeallencook
Copy link
Owner

@jadeallencook jadeallencook commented Nov 26, 2023

df3fcc125d29a0708c8a6a8fecfc4693480e221ee9aaafcc56a9d2111d829fdf

Copy link

vercel bot commented Nov 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
communalists ✅ Ready (Inspect) Visit Preview Dec 1, 2023 10:00am

Copy link
Collaborator

@A1Liu A1Liu left a 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/contexts/RequestFormStatusContext.tsx Show resolved Hide resolved
Comment on lines 7 to 15
const [status, setStatus] = useState<boolean>(false);

const { requestFormStatus, hasFetchedRequestFormStatus } = useContext(
RequestFormStatusContext
);

useEffect(() => {
setStatus(requestFormStatus);
}, [requestFormStatus]);
Copy link
Collaborator

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

Copy link
Owner Author

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.

@jadeallencook jadeallencook merged commit 4c3f8a1 into develop Dec 1, 2023
4 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants