-
Notifications
You must be signed in to change notification settings - Fork 4
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
Dashboard stats via RTK Query. (PP-1418) #122
Conversation
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.
Looks good. It's great how much code you were able to remove. Just one (non-blocking) question.
* Otherwise, statistics for all authorized libraries will be displayed. | ||
* @param {StatsProps} props | ||
* @param {string} props.library - key (short name) of a library. | ||
* */ | ||
export const Stats = (props: StatsProps) => { | ||
const { library: targetLibraryKey } = props; | ||
const { data: statisticsData, fetchError, isLoaded } = useStatistics(); |
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.
Huh, isLoaded
was a misleading name. Glad that's fixed.
src/hooks.ts
Outdated
import { AppDispatch, RootState } from "./store"; | ||
|
||
export const useAppDispatch = () => useDispatch<AppDispatch>(); | ||
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector; |
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.
Do these get used anywhere?
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! I accidentally included an untracked file.
Description
Motivation and Context
[Jira PP-1418]
How Has This Been Tested?
Checklist: