-
Notifications
You must be signed in to change notification settings - Fork 2
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
chore: refactor formatRawProjectTypes
(take 2)
#3421
Conversation
Removed vultr server and associated DNS entries |
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.
One suggested simplification / tidy up 👍
const fetchProjectType = () => { | ||
const projectType = formatRawProjectTypes(rawProjectTypes); |
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.
nit: We have to use this slightly awkward syntax when calling an async function inside a useEffect()
which required us to define the async function in scope.
Now it's no longer async I think we can just simplify this by dropping the useEffect()
and associated useState()
- this isn't a reactive value, just a formatted prop.
const projectType = formatRawProjectTypes(rawProjectTypes);
// or if the above is a little slow/intensive (I don't really think so?)
const projectType = useMemo(formatRawProjectTypes(rawProjectTypes), [rawProjectTypes])
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.
Good catch ! Updated here 24ba79f
(no indication it needs a useMemo
, but we can keep an eye on that in prod)
a0cfa19
to
c23ea89
Compare
bfaaf8b
to
4e14dbf
Compare
- Bump planx-core - Add missing team_settings queries - Add reference_code for BOPS e2e tests
4e14dbf
to
02ed541
Compare
@jessicamcinchak Finally resolved the outstanding issues here -
✅ Regression tests passing against branch here - https://github.com/theopensystemslab/planx-new/actions/runs/9944116858/job/27469441913 |
See theopensystemslab/planx-core#445 for context!
Regression tests timing out on this branch - no errors, not sure why yet ! https://github.com/theopensystemslab/planx-new/actions/runs/9911311940 (likely related to team_settings - let's merge to
main
& fix forward!)Will drop
project_types
table in a followup PR.