Skip to content

Commit

Permalink
fixin'
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Sep 16, 2024
1 parent 6dad022 commit 842e9ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export enum FeatureFlag {
Thumbnails = 'THUMBNAILS',
UseAnalagousColors = 'USE_ANALAGOUS_COLORS',
ForceSqlLabRunAsync = 'SQLLAB_FORCE_RUN_ASYNC',
SlackEnableAvatars = 'SLACK_ENABLE_AVATARS',
}

export type ScheduleQueriesProps = {
Expand Down
4 changes: 2 additions & 2 deletions superset-frontend/src/components/FacePile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
getCategoricalSchemeRegistry,
styled,
isFeatureEnabled,
FeatureFlag,
SupersetTheme,
} from '@superset-ui/core';
import { Tooltip } from 'src/components/Tooltip';
Expand Down Expand Up @@ -54,14 +55,13 @@ const StyledGroup = styled(Avatar.Group)`
`;

export default function FacePile({ users, maxCount = 4 }: FacePileProps) {
const enableAvatars = isFeatureEnabled('SLACK_ENABLE_AVATARS');
return (
<StyledGroup maxCount={maxCount}>
{users.map(({ first_name, last_name, id }) => {
const name = `${first_name} ${last_name}`;
const uniqueKey = `${id}-${first_name}-${last_name}`;
const color = getRandomColor(uniqueKey, colorList);
const avatarUrl = enableAvatars
const avatarUrl = isFeatureEnabled(FeatureFlag.SlackEnableAvatars)
? `/api/v1/user/${id}/avatar.png`
: undefined;
return (
Expand Down

0 comments on commit 842e9ae

Please sign in to comment.