Skip to content

Priority Button#105

Open
RJ0907 wants to merge 38 commits intomasterfrom
reorganizing-priorities
Open

Priority Button#105
RJ0907 wants to merge 38 commits intomasterfrom
reorganizing-priorities

Conversation

@RJ0907
Copy link
Contributor

@RJ0907 RJ0907 commented Mar 20, 2026

A feature that enables strategy team to prioritize teams from 0-10

}),
),
),
map(() => undefined),
Copy link
Contributor

Choose a reason for hiding this comment

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

consider not doing this as it just deletes the result

Comment on lines +14 to +39
useEffect(() => {
const loadPriority = async () => {
if (!Number.isFinite(teamNumber)) {
setTeamPriority(null);
setFeedbackMessage("");
setIsEditing(false);
return;
}

setIsLoading(true);
setFeedbackMessage("");

try {
const data = await fetchATeamPriority(teamNumber);
setTeamPriority(data);
} catch (error) {
console.error(error);
setTeamPriority(null);
setFeedbackMessage("Error loading priority.");
} finally {
setIsLoading(false);
}
};

void loadPriority();
}, [teamNumber]);
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't this the same function from the DisplayPriority and DisplayPriorityCell components?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is, however, it might lead to an error if I use the hook, because I must have access to setTeamPriority and setFeedbackMessage for the editting to be possible.

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