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

[TM-1531] add job connection #745

Draft
wants to merge 1 commit into
base: feat/TM-1531-add-job-service
Choose a base branch
from

Conversation

egrojMonroy
Copy link
Collaborator

add the connection to pull the list of jobs

Copy link

vercel bot commented Dec 13, 2024

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

Name Status Preview Comments Updated (UTC)
wri-terramatch-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 7:37pm

@egrojMonroy egrojMonroy requested a review from roguenet December 13, 2024 19:28
Copy link
Collaborator

@roguenet roguenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A quick review pass to hopefully nudge you closer to the right direction.

return (delayedJobs != null && delayedJobs.length > 0) || hasLoadFailed || isLoading;
};

const delayedJobsConnection: Connection<DelayedJobsConnection, DelayedJobsProps> = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These props aren't used, no reason to include them.

const delayedJobsLoadFailedSelector = (store: ApiDataStore, { uuid }: DelayedJobsProps) => {
const variables: DelayedJobsFindVariables = {
pathParams: { uuid }
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the API request doesn't use these path params, the load failed selector shouldn't either. The params to those two must always match for this feature to function.

selector: selectorCache(
props => props.uuid,
props =>
createSelector(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there are no props, the selector cache isn't needed - it's only needed when there are props to differentiate different selectors. The selector here can just receive createSelector

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants