-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
feat(React): Ownership component of user profile #2173
Changes from 4 commits
5988f23
9bda7c9
4330e71
82190f5
514ce36
2541942
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { EntityType } from '../../types.generated'; | ||
import { useGetSearchResultsQuery } from '../../graphql/search.generated'; | ||
|
||
export function useGetEachEntitySearchResults(input: any) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice! very minor nit: can we call this "useGetAllEntitySearchResults" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
const result: any = {}; | ||
|
||
result[EntityType.Chart] = useGetSearchResultsQuery({ | ||
variables: { | ||
input: { | ||
type: EntityType.Chart, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we pass a "start" and "count" variable into this method and add it here? That way we can control how many results we get for each entity easily. I will likely replace my current entity loading in the "all" tab with what you've added here :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is already handled by the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please see latest change, I have implemented the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you! Looks great. |
||
...input, | ||
}, | ||
}, | ||
}); | ||
|
||
result[EntityType.Dashboard] = useGetSearchResultsQuery({ | ||
variables: { | ||
input: { | ||
type: EntityType.Dashboard, | ||
...input, | ||
}, | ||
}, | ||
}); | ||
|
||
result[EntityType.DataPlatform] = useGetSearchResultsQuery({ | ||
variables: { | ||
input: { | ||
type: EntityType.DataPlatform, | ||
...input, | ||
}, | ||
}, | ||
}); | ||
|
||
result[EntityType.Dataset] = useGetSearchResultsQuery({ | ||
variables: { | ||
input: { | ||
type: EntityType.Dataset, | ||
...input, | ||
}, | ||
}, | ||
}); | ||
|
||
return result; | ||
} |
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.
Nit: can we extract out styles into a
const
variable at the top of the file?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.
Removed inline style