Add UserVisits component - #179
jessicavers wants to merge 4 commits into
Conversation
| } from "./__generated__/UserVisits.generated"; | ||
| import type { Option } from "../../types/workflowFields"; | ||
|
|
||
| const GET_USER_VISITS: TypedDocumentNode< |
There was a problem hiding this comment.
The query here currently returns all instrument sessions for the active user. If the number of sessions is a certain length, this could lengthen the response time and be returning unneeded session information. Pagination or an alternative could be used to prevent that.
The list is later sorted by start date in data/utils, and the most recent five items are presented in the UI component.
Using instrumentSessions(first: 5) would be a possibility, however, it appears to only take into account the first instrumentSessionNumber.
yousefmoazzam
left a comment
There was a problem hiding this comment.
Looks good, thanks!
Only the snake case to camel case suggestion I think is necessary to address, the other two comments I made are less important, feel free to leave them if desired.
yousefmoazzam
left a comment
There was a problem hiding this comment.
Cool, thanks for sorting out the casing of the variable name!
Co-authored-by: Yousef Moazzam <yousefmoazzam@users.noreply.github.com>
17375d4 to
de07c71
Compare
Makes use of OptionSelect and a query to retrieve the current users five most recent visits