Function
canViewUserProfileAnalytics
({
user,
profileUserId,
}: {
user?: Pick<LoggedUser, 'id' | 'isTeamMember'>;
profileUserId?: string;
})
Source from the content-addressed store, hash-verified
| 399 | }; |
| 400 | |
| 401 | export const canViewUserProfileAnalytics = ({ |
| 402 | user, |
| 403 | profileUserId, |
| 404 | }: { |
| 405 | user?: Pick<LoggedUser, 'id' | 'isTeamMember'>; |
| 406 | profileUserId?: string; |
| 407 | }): boolean => { |
| 408 | if (user?.isTeamMember) { |
| 409 | return true; |
| 410 | } |
| 411 | |
| 412 | return !!user?.id && user.id === profileUserId; |
| 413 | }; |
| 414 | |
| 415 | export const userProfileQueryOptions = ({ id }: { id: string }) => { |
| 416 | return { |
Tested by
no test coverage detected