radgrad / radgrad2

Source code for RadGrad, Version 2
https://radgrad.org
9 stars 5 forks source link

COMPONENTIDS.STUDENT_REQUEST_VERIFICATION_BUTTON assigned inappropriately #809

Closed philipmjohnson closed 2 years ago

philipmjohnson commented 2 years ago

Please do work for this task in a branch called issue-809.

While working on a different problem I discovered the following line of code: https://github.com/radgrad/radgrad2/blob/master/app/imports/ui/components/shared/button/ButtonAction.tsx#L15

The problem is that ButtonAction is a generic button, used in 22 places in the UI, but it is assigned a very specific ID applicable to only a single context.

One solution would be to make the ID field a parameter. That way, when the button is used in a specific context, the appropriate ID can be passed in and assigned to the button.